cf_update_capture_comment(): free the shb_inf when we're done with it.

svn path=/trunk/; revision=42830
This commit is contained in:
Jeff Morriss 2012-05-24 18:54:03 +00:00
parent b32c6c0658
commit cef1cc7e14
1 changed files with 3 additions and 0 deletions

3
file.c
View File

@ -3693,10 +3693,13 @@ cf_update_capture_comment(capture_file *cf, gchar *comment)
if (shb_inf && shb_inf->opt_comment) {
if (strcmp(shb_inf->opt_comment, comment) == 0) {
g_free(comment);
g_free(shb_inf);
return;
}
}
g_free(shb_inf);
/* The comment has changed, let's update it */
wtap_write_shb_comment(cf->wth, comment);
/* Mark the file as having unsaved changes */