Skip to content
Commit c64eea6e authored by David Oberhollenzer's avatar David Oberhollenzer
Browse files

mtd_debug: cleanup error handling in flash_to_file



The existing code had multiple error handling labels and did things
like checking if a buffer is not NULL before freeing it.

This patch collapses all of this into a single label. We can do this,
because the standard guarantees us that it is safe to call free() with
a NULL pointer.

This also has the side effect of removing the possibility of using the
wrong error label and accidentally leaking something.

Signed-off-by: default avatarDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
parent c8900946
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment