forked from osmocom/wireshark
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:
parent
7f4ae9a229
commit
0120c12c5d
|
@ -152,6 +152,7 @@ static int ringbuf_exec_compress(gchar* name)
|
||||||
buffer = (guint8*)g_malloc(FS_READ_SIZE);
|
buffer = (guint8*)g_malloc(FS_READ_SIZE);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
ws_close(fd);
|
ws_close(fd);
|
||||||
|
gzclose(fi);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue