diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2020-11-26 14:07:56 -0500 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2020-11-27 14:58:29 +0000 |
commit | 0120c12c5d42a51e068c50bb046add5c8d515905 (patch) | |
tree | 7b7e38dbcf5030b588e9a0c43724b2d1315dc1d8 /ringbuffer.c | |
parent | 7f4ae9a2292ff9b6e56b876fecc86a91517678ac (diff) |
ringbuffer.c: avoid leaking gzFile handle
Avoid leaking the gzFile handle when g_malloc()
fails. This fixes coverity issue 1468698.
Diffstat (limited to 'ringbuffer.c')
-rw-r--r-- | ringbuffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ringbuffer.c b/ringbuffer.c index 0257564217..0a0267037e 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -152,6 +152,7 @@ static int ringbuf_exec_compress(gchar* name) buffer = (guint8*)g_malloc(FS_READ_SIZE); if (buffer == NULL) { ws_close(fd); + gzclose(fi); return -1; } |