pcapng: Free option_content on error

Change-Id: If95c6858370fdff795f5e568d0300fedb1a611ea
Reviewed-on: https://code.wireshark.org/review/29874
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-09-26 12:14:27 -07:00
parent 275a6e4c36
commit a1818692aa
1 changed files with 1 additions and 0 deletions

View File

@ -783,6 +783,7 @@ pcapng_read_if_descr_block(wtap *wth, FILE_T fh, pcapng_block_header_t *bh,
bytes_read = pcapng_read_option(fh, pn, &oh, option_content, opt_cont_buf_len, to_read, err, err_info, "if_descr");
if (bytes_read <= 0) {
pcapng_debug("pcapng_read_if_descr_block: failed to read option");
g_free(option_content);
return FALSE;
}
to_read -= bytes_read;