Skip to content

Commit affac00

Browse files
Issue python#24703: Fixed resource leak on error in bsddb.verify().
Original patch by Pankaj Sharma.
1 parent 81c670d commit affac00

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎Modules/_bsddb.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3454,9 +3454,11 @@ DB_verify(DBObject* self, PyObject* args, PyObject* kwargs)
34543454

34553455
error=DB_close_internal(self, 0, 1);
34563456
if (error) {
3457-
return error;
3457+
if (outFile)
3458+
fclose(outFile);
3459+
return error;
34583460
}
3459-
}
3461+
}
34603462

34613463
MYDB_BEGIN_ALLOW_THREADS;
34623464
err = self->db->verify(self->db, fileName, dbName, outFile, flags);

0 commit comments

Comments
 (0)