mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #24703: Fixed resource leak on error in bsddb.verify().
Original patch by Pankaj Sharma.
This commit is contained in:
@@ -3454,9 +3454,11 @@ DB_verify(DBObject* self, PyObject* args, PyObject* kwargs)
|
||||
|
||||
error=DB_close_internal(self, 0, 1);
|
||||
if (error) {
|
||||
return error;
|
||||
if (outFile)
|
||||
fclose(outFile);
|
||||
return error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MYDB_BEGIN_ALLOW_THREADS;
|
||||
err = self->db->verify(self->db, fileName, dbName, outFile, flags);
|
||||
|
||||
Reference in New Issue
Block a user