diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-07-24 05:05:45 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-07-24 05:05:45 (GMT) |
commit | affac0062dfdca716f4dc9228476b06a516c032b (patch) | |
tree | 2fe54239decedc57874bcd43034cfd4d62b65c7c | |
parent | 81c670d5405192d6c5b6d7fb8ffa3779173a895b (diff) | |
download | cpython-affac0062dfdca716f4dc9228476b06a516c032b.zip cpython-affac0062dfdca716f4dc9228476b06a516c032b.tar.gz cpython-affac0062dfdca716f4dc9228476b06a516c032b.tar.bz2 |
Issue #24703: Fixed resource leak on error in bsddb.verify().
Original patch by Pankaj Sharma.
-rw-r--r-- | Modules/_bsddb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 203bba2..408efc3 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -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); |