diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-04 07:25:25 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-04 07:25:25 (GMT) |
commit | c410d6ce289c4f3e9189afa3e2fef8b0912f398b (patch) | |
tree | f86394029f338748f1fea3593001bcd1ac161771 /Modules/_sqlite | |
parent | 1a494bdf694a9f495021b0e00563c7519754c011 (diff) | |
download | cpython-c410d6ce289c4f3e9189afa3e2fef8b0912f398b.zip cpython-c410d6ce289c4f3e9189afa3e2fef8b0912f398b.tar.gz cpython-c410d6ce289c4f3e9189afa3e2fef8b0912f398b.tar.bz2 |
Fix a couple of memory issues
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/cursor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index e68a275..7f378d6 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -443,14 +443,14 @@ PyObject* _query_execute(Cursor* self, int multiple, PyObject* args) 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 @@ PyObject* cursor_executescript(Cursor* self, PyObject* args) 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; } |