Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index ef3a5a1..c0f5aff 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -484,6 +484,10 @@
                              errors);
                 goto failed;
             }
+            /* skip \x */
+            if (s < end && Py_ISXDIGIT(s[0]))
+                s++; /* and a hexdigit */
+            break;
         default:
             *p++ = '\\';
             s--;