Issue #24703: Fixed resource leak on error in bsddb.verify().

Original patch by Pankaj Sharma.
This commit is contained in:
Serhiy Storchaka
2015-07-24 08:05:45 +03:00
parent 81c670d540
commit affac0062d

View File

@@ -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);