diff options
Diffstat (limited to 'epan/wslua/wslua_pref.c')
-rw-r--r-- | epan/wslua/wslua_pref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/wslua/wslua_pref.c b/epan/wslua/wslua_pref.c index 6c685c07a9..550633fc0c 100644 --- a/epan/wslua/wslua_pref.c +++ b/epan/wslua/wslua_pref.c @@ -87,7 +87,7 @@ static int new_pref(lua_State* L, pref_type_t type) { const gchar* label = luaL_optstring(L,1,NULL); const gchar* descr = luaL_optstring(L,3,""); - Pref pref = (wslua_pref_t *)g_malloc0(sizeof(wslua_pref_t)); + Pref pref = g_new0(wslua_pref_t, 1); pref->label = g_strdup(label); pref->desc = g_strdup(descr); pref->type = type; |