diff options
| author | Xin LI <delphij@FreeBSD.org> | 2016-06-26 20:59:11 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2016-06-26 20:59:11 +0000 |
| commit | 581c312f134935d421daea8ff9efe57e66a2beab (patch) | |
| tree | d4db8d35ebe47a20f97f06e315b4a93cf2f0b6d1 /src/file.c | |
| parent | 509ff251d4b89e75b87130948ac80361b40c6f79 (diff) | |
Diffstat (limited to 'src/file.c')
| -rw-r--r-- | src/file.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/file.c b/src/file.c index 2226ec415b72..9a8606d5418f 100644 --- a/src/file.c +++ b/src/file.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: file.c,v 1.170 2016/03/31 17:51:12 christos Exp $") +FILE_RCSID("@(#)$File: file.c,v 1.171 2016/05/17 15:52:45 christos Exp $") #endif /* lint */ #include "magic.h" @@ -351,9 +351,10 @@ main(int argc, char *argv[]) if (c == -1) { (void)fprintf(stderr, "%s: %s\n", progname, magic_error(magic)); - return 1; + e = 1; + goto out; } - return 0; + goto out; default: if (magic == NULL) if ((magic = load(magicfile, flags)) == NULL) @@ -383,6 +384,7 @@ main(int argc, char *argv[]) e |= process(magic, argv[optind], wid); } +out: if (magic) magic_close(magic); return e; |
