Ensure memory is freed if the acuisition of the bind names fails entirely.

This commit is contained in:
Anthony Tuininga 2008-11-21 16:08:51 +00:00
parent c4a17177aa
commit 4b208c603a

View File

@ -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);