sharkd: free initalized wtap_rec when wtap failed to read frame.
Change-Id: I564a3704c0ea1b0df85f3cafacf790ed24591232 Reviewed-on: https://code.wireshark.org/review/30086 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
This commit is contained in:
parent
420c4ecc56
commit
988b14ad72
2
sharkd.c
2
sharkd.c
|
@ -544,6 +544,7 @@ sharkd_dissect_request(guint32 framenum, guint32 frame_ref_num, guint32 prev_dis
|
|||
ws_buffer_init(&buf, 1500);
|
||||
|
||||
if (!wtap_seek_read(cfile.provider.wth, fdata->file_off, &rec, &buf, &err, &err_info)) {
|
||||
wtap_rec_cleanup(&rec);
|
||||
ws_buffer_free(&buf);
|
||||
return -1; /* error reading the record */
|
||||
}
|
||||
|
@ -604,6 +605,7 @@ sharkd_dissect_columns(frame_data *fdata, guint32 frame_ref_num, guint32 prev_di
|
|||
|
||||
if (!wtap_seek_read(cfile.provider.wth, fdata->file_off, &rec, &buf, &err, &err_info)) {
|
||||
col_fill_in_error(cinfo, fdata, FALSE, FALSE /* fill_fd_columns */);
|
||||
wtap_rec_cleanup(&rec);
|
||||
ws_buffer_free(&buf);
|
||||
return -1; /* error reading the record */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue