diff options
| author | Mark Wielaard <[email protected]> | 2013-03-01 11:51:58 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2013-03-01 11:51:58 +0100 |
| commit | a58951b183fb3e051870b19c95d8082a3efa3ddb (patch) | |
| tree | 1c8f194f4f00e63d8abdb4306e40ce84e37a19b4 /src/findtextrel.c | |
| parent | b94cceae503b56fb360cd597f154fa2b33552887 (diff) | |
Fix two memory leaks in findtextrel and strip.
The findtextrel leak is real, when processing lots of files without text
relocations the files and memory wouldn't be released. The strip leak is
minor since it can only happen when using -f which only allows one file
as argument. But it is nice to see valgrind say:
"All heap blocks were freed -- no leaks are possible".
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/findtextrel.c')
| -rw-r--r-- | src/findtextrel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/findtextrel.c b/src/findtextrel.c index 39f7c924..9fd81633 100644 --- a/src/findtextrel.c +++ b/src/findtextrel.c @@ -311,7 +311,7 @@ process_file (const char *fname, bool more_than_one) if (!have_textrel) { error (0, 0, gettext ("no text relocations reported in '%s'"), fname); - return 1; + goto err_elf_close; } int fd2 = -1; |
