Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/cursor.c @ 37461:6ab15fc85c2d legacy-trunk
Fix a couple of memory issues
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Tue, 04 Apr 2006 07:25:25 +0000 |
| parents | d27058c409df |
| children | d3969aeba777 |
line wrap: on
line diff
--- a/Modules/_sqlite/cursor.c Tue Apr 04 07:10:59 2006 +0000 +++ b/Modules/_sqlite/cursor.c Tue Apr 04 07:25:25 2006 +0000 @@ -443,14 +443,14 @@ if (second_argument == NULL) { second_argument = PyTuple_New(0); if (!second_argument) { - return NULL; + goto error; } } else { Py_INCREF(second_argument); } if (PyList_Append(parameters_list, second_argument) != 0) { Py_DECREF(second_argument); - return NULL; + goto error; } Py_DECREF(second_argument); @@ -714,7 +714,7 @@ script_cstr = PyString_AsString(script_obj); } else if (PyUnicode_Check(script_obj)) { script_str = PyUnicode_AsUTF8String(script_obj); - if (!script_obj) { + if (!script_str) { return NULL; }
