Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2820ae

Browse files
committed
Fix another leak in bsddb, and avoid use of uninitialized value -- funny how
gcc 4.0.x wasn't complaining about *that* one ;)
1 parent 9fe582c commit b2820ae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_bsddb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,7 @@ DB_join(DBObject* self, PyObject* args)
17421742
return NULL;
17431743
}
17441744
cursors[x] = ((DBCursorObject*)item)->dbc;
1745+
Py_DECREF(item);
17451746
}
17461747

17471748
MYDB_BEGIN_ALLOW_THREADS;
@@ -2017,7 +2018,7 @@ _db_compareCallback(DB* db,
20172018
{
20182019
int res = 0;
20192020
PyObject *args;
2020-
PyObject *result;
2021+
PyObject *result = NULL;
20212022
DBObject *self = (DBObject *)db->app_private;
20222023

20232024
if (self == NULL || self->btCompareCallback == NULL) {

0 commit comments

Comments
 (0)