mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 19:03:43 +03:00
cursor.callproc: added a missing memory check
This commit is contained in:
parent
31c95c0922
commit
e9bb4a86f9
|
@ -1072,6 +1072,13 @@ psyco_curs_callproc(cursorObject *self, PyObject *args)
|
|||
/* we will throw the sanitized C strings into a cache to not redo the work later */
|
||||
parameter_name_cstr_sanitized_CACHE = PyMem_New(char *, nparameters);
|
||||
|
||||
if (parameter_name_cstr_sanitized_CACHE == NULL) {
|
||||
PyErr_NoMemory();
|
||||
PyMem_Del(parameter_name_cstr_sanitized_CACHE);
|
||||
Py_DECREF(parameter_names);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
for(i=0; i<nparameters; i++) {
|
||||
parameter_name = PyList_GetItem(parameter_names, i);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user