forked from osmocom/wireshark
pcapng: Free option_content on error
Change-Id: If36b92def61112f8ebe8cfda0edfb63a15c46af0 Reviewed-on: https://code.wireshark.org/review/25925 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
fc9ee03ada
commit
d209fe6e18
|
@ -623,6 +623,7 @@ pcapng_read_section_header_block(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, "section_header");
|
bytes_read = pcapng_read_option(fh, pn, &oh, option_content, opt_cont_buf_len, to_read, err, err_info, "section_header");
|
||||||
if (bytes_read <= 0) {
|
if (bytes_read <= 0) {
|
||||||
pcapng_debug("pcapng_read_section_header_block: failed to read option");
|
pcapng_debug("pcapng_read_section_header_block: failed to read option");
|
||||||
|
g_free(option_content);
|
||||||
return PCAPNG_BLOCK_ERROR;
|
return PCAPNG_BLOCK_ERROR;
|
||||||
}
|
}
|
||||||
to_read -= bytes_read;
|
to_read -= bytes_read;
|
||||||
|
|
Loading…
Reference in New Issue