From c3190adc12e3e7ceb14c62808f7d1d07756137c9 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 15 Jun 2016 20:35:47 +0200 Subject: [PATCH] capture info (wslua): Dereference of null pointer Change-Id: Iced579d5acaefa9d1c8e3775a53916773bf87659 Reviewed-on: https://code.wireshark.org/review/15929 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- epan/wslua/wslua_capture_info.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epan/wslua/wslua_capture_info.c b/epan/wslua/wslua_capture_info.c index e63a1516ee..e0293dad0b 100644 --- a/epan/wslua/wslua_capture_info.c +++ b/epan/wslua/wslua_capture_info.c @@ -54,6 +54,7 @@ CaptureInfo* push_CaptureInfo(lua_State* L, wtap *wth, const gboolean first_time if (!wth) { luaL_error(L, "Internal error: wth is NULL!"); + return NULL; } f = (CaptureInfo) g_malloc0(sizeof(struct _wslua_captureinfo)); @@ -327,6 +328,7 @@ CaptureInfoConst* push_CaptureInfoConst(lua_State* L, wtap_dumper *wdh) { if (!wdh) { luaL_error(L, "Internal error: wdh is NULL!"); + return NULL; } f = (CaptureInfoConst) g_malloc0(sizeof(struct _wslua_captureinfo));