From cef1cc7e14065b6e5aae2f90b30c4eaeb42e3657 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Thu, 24 May 2012 18:54:03 +0000 Subject: [PATCH] cf_update_capture_comment(): free the shb_inf when we're done with it. svn path=/trunk/; revision=42830 --- file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file.c b/file.c index bfbc293ab1..83829d0e24 100644 --- a/file.c +++ b/file.c @@ -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 */