dwarves: Don't use conf if its NULL in cus__load_running_kernel()

Don't use it if NULL, fixing a segfault with dtagnames as reported in:

https://bugzilla.redhat.com/show_bug.cgi?id=1795379

Reported-by: Jan Pokorný <jpokorny@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2020-02-12 16:10:09 -03:00
parent dde3eb086d
commit d7b3510795
1 changed files with 1 additions and 1 deletions

View File

@ -2114,7 +2114,7 @@ static int cus__load_running_kernel(struct cus *cus, struct conf_load *conf)
if (loader == -1)
goto try_elf;
if (conf->conf_fprintf)
if (conf && conf->conf_fprintf)
conf->conf_fprintf->has_alignment_info = debug_fmt_table[loader]->has_alignment_info;
if (debug_fmt_table[loader]->load_file(cus, conf, "/sys/kernel/btf/vmlinux") == 0)