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.
This commit is contained in:
parent
297b6c5407
commit
7f6c5d0137
|
@ -888,6 +888,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