forked from osmocom/wireshark
k12: plug a memory leak.
If the two putative number-of-records values don't match (meaning one of
them is presumably the number of records and the other one isn't - we
don't know which is the case), free up the private data structure we
allocated before returning an error.
(cherry picked from commit 7f6c5d0137
)
This commit is contained in:
parent
7438c67f06
commit
67ca5e98c7
|
@ -883,6 +883,7 @@ wtap_open_return_val k12_open(wtap *wth, int *err, gchar **err_info) {
|
|||
K12_FILE_HDR_RECORD_COUNT_1,
|
||||
pntoh32( header_buffer + K12_FILE_HDR_RECORD_COUNT_2 ),
|
||||
K12_FILE_HDR_RECORD_COUNT_2 );
|
||||
destroy_k12_file_data(file_data);
|
||||
return WTAP_OPEN_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue