forked from osmocom/wireshark
netscaler: plug a memory leak.
Free the read buffer if the first read fails.
This commit is contained in:
parent
1bb64b7e0c
commit
976ccc9a00
|
@ -734,6 +734,7 @@ wtap_open_return_val nstrace_open(wtap *wth, int *err, gchar **err_info)
|
|||
bytes_read = file_read(nstrace_buf, page_size, wth->fh);
|
||||
if (bytes_read < 0 || bytes_read != page_size) {
|
||||
*err = file_error(wth->fh, err_info);
|
||||
g_free(nstrace_buf);
|
||||
if (*err == 0 && bytes_read > 0)
|
||||
return WTAP_OPEN_NOT_MINE;
|
||||
return WTAP_OPEN_ERROR;
|
||||
|
|
Loading…
Reference in New Issue