Skip to content
Snippets Groups Projects
Commit c8e7fa41 authored by Augie Fackler's avatar Augie Fackler
Browse files

diffhelpers: verify hline was created before using it

Found with cpychecker.
parent df463ca0
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,9 @@
sz -= 1;
hline = PyBytes_FromStringAndSize(l, sz-1);
if (!hline) {
return NULL;
}
if (c == ' ' || c == '+') {
PyObject *rline = PyBytes_FromStringAndSize(l + 1, sz - 2);
......@@ -194,4 +197,3 @@
NULL, NULL);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment