aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-09-10 23:38:36 +0100
committerJoão Valverde <j@v6e.pt>2017-09-11 16:48:49 +0000
commit69f0cb0cef3e8cc6b49073768f76ff1046ded8b5 (patch)
tree7a6314bf9e04fc5575a8c61df5f62c68be9e76c8 /ui
parente7aa63746ba630d88032394f4869fca2c87853a8 (diff)
wsutil: Initialize and store plugin personal dir
Obviate allocation on every call to get_plugins_pers_dir(). Change-Id: I089ae499f93739d490d4552f59b5db5996f7d26f Reviewed-on: https://code.wireshark.org/review/23495 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk/about_dlg.c4
-rw-r--r--ui/qt/about_dialog.cpp3
2 files changed, 2 insertions, 5 deletions
diff --git a/ui/gtk/about_dlg.c b/ui/gtk/about_dlg.c
index 020452c1ca..a5d8643f7a 100644
--- a/ui/gtk/about_dlg.c
+++ b/ui/gtk/about_dlg.c
@@ -460,10 +460,8 @@ about_folders_page_new(void)
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
/* pers plugins */
- path = get_plugins_pers_dir();
- about_folders_row(table, "Personal Plugins", path,
+ about_folders_row(table, "Personal Plugins", get_plugins_pers_dir(),
"dissector plugins");
- g_free(path);
/* global plugins */
about_folders_row(table, "Global Plugins", get_plugin_dir(),
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
index 6fa0e41c67..c4b9c3128a 100644
--- a/ui/qt/about_dialog.cpp
+++ b/ui/qt/about_dialog.cpp
@@ -226,8 +226,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
/* pers plugins */
- message += about_folders_row("Personal Plugins", gchar_free_to_qstring(get_plugins_pers_dir()),
- "dissector plugins");
+ message += about_folders_row("Personal Plugins", get_plugins_pers_dir(), "dissector plugins");
/* global plugins */
message += about_folders_row("Global Plugins", get_plugin_dir(), "dissector plugins");