From 72c2256633e37b7bbec0ea72e90e27a0267bef8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Mon, 4 Dec 2017 07:28:49 +0000 Subject: [PATCH] make-dissectors: Fix null pointer dereference for error condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found by scan-build. Change-Id: I89b56bac951ccb7054d494592928306a860f9e5e Reviewed-on: https://code.wireshark.org/review/24697 Petri-Dish: João Valverde Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/make-dissectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/make-dissectors.c b/epan/dissectors/make-dissectors.c index bca8ce1e38..68bf37df4e 100644 --- a/epan/dissectors/make-dissectors.c +++ b/epan/dissectors/make-dissectors.c @@ -68,7 +68,7 @@ scan_list(const char *file, GPtrArray *protos, GPtrArray *handoffs) char *contents, *arg; GError *err = NULL; - if (!g_file_get_contents(file, &contents, NULL, NULL)) { + if (!g_file_get_contents(file, &contents, NULL, &err)) { fprintf(stderr, "%s: %s\n", file, err->message); exit(1); }