make-dissectors: Fix null pointer dereference for error condition

Found by scan-build.

Change-Id: I89b56bac951ccb7054d494592928306a860f9e5e
Reviewed-on: https://code.wireshark.org/review/24697
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
João Valverde 2017-12-04 07:28:49 +00:00 committed by Anders Broman
parent d3a3b0ba27
commit 72c2256633
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}