]> granicus.if.org Git - python/commitdiff
Fix another leak in bsddb, and avoid use of uninitialized value -- funny how
authorThomas Wouters <thomas@python.org>
Sun, 12 Mar 2006 00:01:38 +0000 (00:01 +0000)
committerThomas Wouters <thomas@python.org>
Sun, 12 Mar 2006 00:01:38 +0000 (00:01 +0000)
gcc 4.0.x wasn't complaining about *that* one ;)

Modules/_bsddb.c

index f998376694a5f64484c12c490df8ffb2bd3f3010..9d0893e7cadc7a6f2b39ca21c3e76fcc725bddac 100644 (file)
@@ -1742,6 +1742,7 @@ DB_join(DBObject* self, PyObject* args)
             return NULL;
         }
         cursors[x] = ((DBCursorObject*)item)->dbc;
+        Py_DECREF(item);
     }
 
     MYDB_BEGIN_ALLOW_THREADS;
@@ -2017,7 +2018,7 @@ _db_compareCallback(DB* db,
 {
     int res = 0;
     PyObject *args;
-    PyObject *result;
+    PyObject *result = NULL;
     DBObject *self = (DBObject *)db->app_private;
 
     if (self == NULL || self->btCompareCallback == NULL) {