dwarves: We need to consistently check if 'conf was specified

Addresses this coverity report entry:

  Error: FORWARD_NULL (CWE-476): [#def12]
  dwarves-1.13/dwarves.c:1708: var_compare_op: Comparing "conf" to null implies that "conf" might be null.
  dwarves-1.13/dwarves.c:1743: var_deref_op: Dereferencing null pointer "conf".
  # 1741|
  # 1742|   	while (debug_fmt_table[i] != NULL) {
  # 1743|-> 		if (conf->conf_fprintf)
  # 1744|   			conf->conf_fprintf->has_alignment_info = debug_fmt_table[i]->has_alignment_info;
  # 1745|   		if (debug_fmt_table[i]->load_file(cus, conf, filename) == 0)

The first check setting added by 49c27bdd6663 ("core: Allow the loaders
to advertise features they have") was inside a block where conf was
already checked, the second wasn't, fix it.

Reported-by: William Cohen <wcohen@redhat.com>
Fixes: 49c27bdd6663 ("core: Allow the loaders to advertise features they have")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed