Within create_dwfl, if dwfl_begin is successful but dwfl_report_offline
fails, the dwfl * pointer being reported is reset to NULL without calling
dwfl_end, causing a memory leak.
Update create_dwfl to call dwfl_end in this case, preventing the leak.
Signed-off-by: Aaron Merey <amerey@redhat.com>
error (0, 0, _("failed reading '%s': %s"),
fname, dwfl_errmsg (-1));
close (dwfl_fd); /* Consumed on success, not on failure. */
+ dwfl_end (dwfl);
dwfl = NULL;
}
else