forked from osmocom/wireshark
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:
parent
d3a3b0ba27
commit
72c2256633
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ scan_list(const char *file, GPtrArray *protos, GPtrArray *handoffs)
|
||||||
char *contents, *arg;
|
char *contents, *arg;
|
||||||
GError *err = NULL;
|
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);
|
fprintf(stderr, "%s: %s\n", file, err->message);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue