Fix a mem leak of the disk cache directory path

This commit is contained in:
Kovid Goyal 2021-04-10 13:21:58 +05:30
parent 03f0f065ee
commit 7ec803222f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -459,6 +459,7 @@ dealloc(DiskCache* self) {
self->cache_file_fd = -1; self->cache_file_fd = -1;
} }
if (self->currently_writing.data) free(self->currently_writing.data); if (self->currently_writing.data) free(self->currently_writing.data);
free(self->cache_dir); self->cache_dir = NULL;
Py_TYPE(self)->tp_free((PyObject*)self); Py_TYPE(self)->tp_free((PyObject*)self);
} }