Skip to content

Commit ed00f95

Browse files
committed
Fix mmap
1 parent d8a4659 commit ed00f95

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/mmapmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ _safe_PyBytes_FromStringAndSize(char *start, size_t num_bytes) {
457457
}
458458
if (safe_memcpy(PyBytesWriter_GetData(writer), start, num_bytes) < 0) {
459459
PyBytesWriter_Discard(writer);
460+
return NULL;
460461
}
461462
return PyBytesWriter_Finish(writer);
462463
}

0 commit comments

Comments
 (0)