dwarf_loader: Fix memleaks in creating cus
Coverity reports a possible memleak in dwarf_cus__create_cu() due to CU
not being freed for the case when it was allocated but cu__set_common()
failed. The same situation occurs in __cus_load_debug_types().
Fix the leaks.
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Viktor Malik <vmalik@redhat.com>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/r/20240903062352.763644-1-vmalik@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed