Ensure memory is freed if the acuisition of the bind names fails entirely.
This commit is contained in:
parent
c4a17177aa
commit
4b208c603a
4
Cursor.c
4
Cursor.c
@ -403,8 +403,10 @@ static int Cursor_GetBindNames(
|
||||
indicatorNameLengths, duplicate, bindHandles);
|
||||
if (status != OCI_NO_DATA &&
|
||||
Environment_CheckForError(self->environment, status,
|
||||
"Cursor_GetBindNames()") < 0)
|
||||
"Cursor_GetBindNames()") < 0) {
|
||||
PyMem_Free(buffer);
|
||||
return -1;
|
||||
}
|
||||
if (foundElements < 0) {
|
||||
*names = NULL;
|
||||
PyMem_Free(buffer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user