Skip to content

Commit c583919

Browse files
Alexey Izbyshevberkerpeksag
authored andcommitted
bpo-34462: Add missing NULL check to _copy_raw_string() (GH-8863)
Reported by Svace static analyzer.
1 parent e7d4b2f commit c583919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_xxsubinterpretersmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ _copy_raw_string(PyObject *strobj)
1515
return NULL;
1616
}
1717
char *copied = PyMem_Malloc(strlen(str)+1);
18-
if (str == NULL) {
18+
if (copied == NULL) {
1919
PyErr_NoMemory();
2020
return NULL;
2121
}

0 commit comments

Comments
 (0)