plugin_if: fix small memory leak in ext_menubar_add_separator

No need to clone memory as ext_menubar_add_generic_entry g_strdups the
label argument. Found by Clang Static Analyzer.

Change-Id: I7ffe3d0cae0093410f2015e6beb8b8e97a871b2a
Fixes: v1.99.6rc0-213-geeed4d1121 ("UI: Implementing menus for plugins")
Reviewed-on: https://code.wireshark.org/review/27342
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
Peter Wu 2018-05-04 22:10:46 +02:00 committed by Roland Knall
parent 8569b8000f
commit 1ebbb09c5b
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ extern void ext_menubar_add_website(ext_menu_t * parent, const gchar *label,
extern void ext_menubar_add_separator(ext_menu_t *parent)
{
ext_menubar_add_generic_entry ( EXT_MENUBAR_SEPARATOR, parent, g_strdup("-"), NULL, NULL, NULL );
ext_menubar_add_generic_entry ( EXT_MENUBAR_SEPARATOR, parent, "-", NULL, NULL, NULL );
}
/* Implementation of external toolbar handlers */