diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-08-22 16:30:16 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-08-22 16:30:16 +0000 |
commit | 2f77efce7da0a079c38609e7bd24cc69937863b1 (patch) | |
tree | 2c5d954d066dd1bc7b7b81af5e15b2ebea283dcd /capture_ui_utils.c | |
parent | 914e885354a310ae9219a9cd42da5f1123a3acc3 (diff) |
Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1757 :
Try to call get_interface_descriptive_name() as little as possible (storing
the result in capture_opts) to avoid a performance hit during live capture
(especially if you have lots of interfaces) and to avoid leaking memory.
One issue with this is that capture_opts.c cannot (without adding significant
dependencies) set the iface_descr so readers of that field (only gtk/main.c
and tshark.c) use a macro to (set if not already set and) get the value of
that field.
svn path=/trunk/; revision=22587
Diffstat (limited to 'capture_ui_utils.c')
-rw-r--r-- | capture_ui_utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/capture_ui_utils.c b/capture_ui_utils.c index 67e659219a..33a4b9c1fe 100644 --- a/capture_ui_utils.c +++ b/capture_ui_utils.c @@ -100,6 +100,8 @@ capture_dev_user_descr_find(const gchar *if_name) * If the user has specified a comment, use that. Otherwise, * if get_interface_list() supplies a description, use that, * otherwise use the interface name. + * + * The result must be g_free()'d when you're done with it. */ char * get_interface_descriptive_name(const char *if_name) |