fix the additional rare (out of memory only) bug that it was supposed to fix
of not freeing log_list when the python allocator failed.
if (!PyArg_ParseTuple(args, "|i:log_archive", &flags))
return NULL;
- list = PyList_New(0);
- if (list == NULL)
- return NULL;
-
CHECK_ENV_NOT_CLOSED(self);
MYDB_BEGIN_ALLOW_THREADS;
#if (DBVER >= 40)
MYDB_END_ALLOW_THREADS;
RETURN_IF_ERR();
+ list = PyList_New(0);
+ if (list == NULL) {
+ if (log_list)
+ free(log_list);
+ return NULL;
+ }
+
if (log_list) {
char **log_list_start;
for (log_list_start = log_list; *log_list != NULL; ++log_list) {