]> Git Repo - linux.git/commitdiff
x86/boot: Fix minor fd leakage in tools/relocs.c
authorCong Ding <[email protected]>
Mon, 14 Jan 2013 17:13:35 +0000 (17:13 +0000)
committerH. Peter Anvin <[email protected]>
Sun, 27 Jan 2013 18:24:28 +0000 (10:24 -0800)
The opened file should be closed.

Signed-off-by: Cong Ding <[email protected]>
Cc: Kusanagi Kouichi <[email protected]>
Cc: Jarkko Sakkinen <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Matt Fleming <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/tools/relocs.c

index 5a1847d619306e5f0ed5ed5570c53c69a8ce2315..79d67bd507fa6c5bd779defa312943b1d99a47f6 100644 (file)
@@ -814,12 +814,14 @@ int main(int argc, char **argv)
        read_relocs(fp);
        if (show_absolute_syms) {
                print_absolute_symbols();
-               return 0;
+               goto out;
        }
        if (show_absolute_relocs) {
                print_absolute_relocs();
-               return 0;
+               goto out;
        }
        emit_relocs(as_text, use_real_mode);
+out:
+       fclose(fp);
        return 0;
 }
This page took 0.05598 seconds and 4 git commands to generate.