]> git.ipfire.org Git - thirdparty/elfutils.git/commit
backends: Check results for NULL early in dwarf_peeled_die_type
authorMark Wielaard <mark@klomp.org>
Thu, 6 Apr 2023 14:49:27 +0000 (16:49 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 14 Apr 2023 15:25:03 +0000 (17:25 +0200)
commit3daddabd5d619bc2316813a5676d9be34ad3f6ac
treef8689d790ab9839774977bf327f6e9549e22b4b7
parent7676df99484184ff971cf37f3aa54d5e457d6e35
backends: Check results for NULL early in dwarf_peeled_die_type

Calling dwarf_peeled_die_type with a NULL results pointer is an error,
check early that result is not NULL so dwarf_formref_die and
dwarf_peel_type won't try to set the NULL Dwarf_Die.

* backends/libebl_CPU.h (dwarf_peeled_die_type): Move check
        for results == NULL to start of function.

Signed-off-by: Mark Wielaard <mark@klomp.org>
backends/libebl_CPU.h