ringbuffer.c: avoid leaking gzFile handle

Avoid leaking the gzFile handle when g_malloc()
fails. This fixes coverity issue 1468698.
This commit is contained in:
Moshe Kaplan 2020-11-26 14:07:56 -05:00 committed by AndersBroman
parent 7f4ae9a229
commit 0120c12c5d
1 changed files with 1 additions and 0 deletions

View File

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