Clear the object prior to fetching; otherwise, OCI will try to do something
with it and potentially crash the application!
This commit is contained in:
parent
6ef66ec3d6
commit
9fe01bd90b
@ -225,10 +225,13 @@ static int ObjectVar_PreFetch(
|
|||||||
ub4 i;
|
ub4 i;
|
||||||
|
|
||||||
for (i = 0; i < var->allocatedElements; i++) {
|
for (i = 0; i < var->allocatedElements; i++) {
|
||||||
Py_CLEAR(var->objects[i]);
|
if (var->objects[i])
|
||||||
if (var->data[i])
|
Py_CLEAR(var->objects[i]);
|
||||||
|
else if (var->data[i])
|
||||||
OCIObjectFree(var->environment->handle,
|
OCIObjectFree(var->environment->handle,
|
||||||
var->environment->errorHandle, var->data[i], OCI_DEFAULT);
|
var->environment->errorHandle, var->data[i], OCI_DEFAULT);
|
||||||
|
var->data[i] = NULL;
|
||||||
|
var->objectIndicator[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user