diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-09-10 23:38:36 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2017-09-11 16:48:49 +0000 |
commit | 69f0cb0cef3e8cc6b49073768f76ff1046ded8b5 (patch) | |
tree | 7a6314bf9e04fc5575a8c61df5f62c68be9e76c8 /epan/wslua/wslua_dir.c | |
parent | e7aa63746ba630d88032394f4869fca2c87853a8 (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 'epan/wslua/wslua_dir.c')
-rw-r--r-- | epan/wslua/wslua_dir.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/wslua/wslua_dir.c b/epan/wslua/wslua_dir.c index c467132706..1dc356ad71 100644 --- a/epan/wslua/wslua_dir.c +++ b/epan/wslua/wslua_dir.c @@ -324,9 +324,7 @@ WSLUA_CONSTRUCTOR Dir_personal_plugins_path(lua_State* L) { @since 1.11.3 */ - char* filename = get_plugins_pers_dir(); - lua_pushstring(L,filename); - g_free(filename); + lua_pushstring(L, get_plugins_pers_dir()); WSLUA_RETURN(1); /* The pathname for the personal plugins directory. */ } |