From e5152bf4ebd4f573ae1d0770044e2bff7ab66d5e Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Wed, 28 Sep 2011 20:45:24 +0200 Subject: libxtables: Fix file descriptor leak in xtables_lmap_init on error Signed-off-by: Thomas Jarosch Signed-off-by: Pablo Neira Ayuso --- libxtables/xtoptions.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libxtables/xtoptions.c') diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c index 5f617a42..452e0fef 100644 --- a/libxtables/xtoptions.c +++ b/libxtables/xtoptions.c @@ -1139,6 +1139,7 @@ struct xtables_lmap *xtables_lmap_init(const char *file) fclose(fp); return lmap_head; out: + fclose(fp); xtables_lmap_free(lmap_head); return NULL; } -- cgit v1.2.3