diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-02 09:45:12 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-02 09:45:12 +0000 |
commit | d23aa74b403012294598f58f3d6d1ac983833cfe (patch) | |
tree | 1544dff0eb3db3e58d4f8f254472fb9f47ec3ed3 /capture_opts.c | |
parent | f0ea386797ca20bc1a7c6db4bad98dd024cb3755 (diff) |
Frederic Heem:
Fix some memleaks and overflows.
I haven't committed the changes that are not bug fixes.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19777 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/capture_opts.c b/capture_opts.c index 70bccc2d6f..49326c5b3d 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -330,6 +330,7 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg, return 1; } capture_opts->has_cfilter = TRUE; + g_free(capture_opts->cfilter); capture_opts->cfilter = g_strdup(optarg); break; case 'H': /* Hide capture info dialog box */ @@ -361,6 +362,7 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg, break; case 'w': /* Write to capture file x */ capture_opts->saving_to_file = TRUE; + g_free(capture_opts->save_file); #if defined _WIN32 && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) /* since GLib 2.6, we need to convert filenames to utf8 for Win32 */ capture_opts->save_file = g_locale_to_utf8(optarg, -1, NULL, NULL, NULL); |