8000 Merge pull request #13291 from meeseeksmachine/auto-backport-of-pr-13… · ivanov/matplotlib@5e7a327 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e7a327

Browse files
authored
Merge pull request matplotlib#13291 from meeseeksmachine/auto-backport-of-pr-13287-on-v3.0.x
Backport PR matplotlib#13287 on branch v3.0.x (Fix unsafe use of NULL pointer)
2 parents 1013cea + 6d748f1 commit 5e7a327

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/file_compat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static NPY_INLINE FILE *mpl_PyFile_Dup(PyObject *file, char *mode, mpl_off_t *or
9595
#endif
9696
if (handle == NULL) {
9797
PyErr_SetString(PyExc_IOError, "Getting a FILE* from a Python file object failed");
98+
return NULL;
9899
}
99100

100101
/* Record the original raw file handle position */

0 commit comments

Comments
 (0)
0