Should have been part of r41542: Don't free idb_inf in wtap_dump_open_ng(): free it in the callers.
svn path=/trunk/; revision=41553
This commit is contained in:
parent
2d829b392f
commit
9e8148eeef
7
file.c
7
file.c
|
@ -3665,7 +3665,7 @@ cf_read_shb_comment(capture_file *cf)
|
||||||
/* Get info from SHB */
|
/* Get info from SHB */
|
||||||
shb_inf = wtap_file_get_shb_info(cf->wth);
|
shb_inf = wtap_file_get_shb_info(cf->wth);
|
||||||
if(shb_inf == NULL)
|
if(shb_inf == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
temp_str = shb_inf->opt_comment;
|
temp_str = shb_inf->opt_comment;
|
||||||
g_free(shb_inf);
|
g_free(shb_inf);
|
||||||
|
|
||||||
|
@ -3855,6 +3855,9 @@ cf_save(capture_file *cf, const char *fname, packet_range_t *range, guint save_f
|
||||||
|
|
||||||
pdh = wtap_dump_open_ng(fname, save_format, cf->lnk_t, cf->snap,
|
pdh = wtap_dump_open_ng(fname, save_format, cf->lnk_t, cf->snap,
|
||||||
compressed, shb_hdr, idb_inf, &err);
|
compressed, shb_hdr, idb_inf, &err);
|
||||||
|
g_free(idb_inf);
|
||||||
|
idb_inf = NULL;
|
||||||
|
|
||||||
if (pdh == NULL) {
|
if (pdh == NULL) {
|
||||||
cf_open_failure_alert_box(fname, err, NULL, TRUE, save_format);
|
cf_open_failure_alert_box(fname, err, NULL, TRUE, save_format);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -3863,7 +3866,7 @@ cf_save(capture_file *cf, const char *fname, packet_range_t *range, guint save_f
|
||||||
/* Add address resolution */
|
/* Add address resolution */
|
||||||
wtap_dump_set_addrinfo_list(pdh, get_addrinfo_list());
|
wtap_dump_set_addrinfo_list(pdh, get_addrinfo_list());
|
||||||
|
|
||||||
/* XXX - we let the user save a subset of the packets.
|
/* XXX - we let the user save a subset of the packets.
|
||||||
|
|
||||||
If we do that, should we make that file the current file? If so,
|
If we do that, should we make that file the current file? If so,
|
||||||
it means we can no longer get at the other packets. What does
|
it means we can no longer get at the other packets. What does
|
||||||
|
|
Loading…
Reference in New Issue