pcapng: Free option_content on error

Change-Id: I5a406ecf4e495d0224473d01af4144479ceaf9c3
Reviewed-on: https://code.wireshark.org/review/29863
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:
Stig Bjørlykke 2018-09-26 20:04:35 +02:00
parent 64b604a1e6
commit 65a422e235
1 changed files with 1 additions and 0 deletions

View File

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