summaryrefslogtreecommitdiffstats
path: root/libxtables
diff options
context:
space:
mode:
authorThomas Jarosch <thomas.jarosch@intra2net.com>2011-09-28 20:45:24 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2011-09-28 20:45:24 +0200
commite5152bf4ebd4f573ae1d0770044e2bff7ab66d5e (patch)
treea7d7a15cdd4843976c858816c1abe238a1b67352 /libxtables
parentd2b0eaa297dfa87f54b3fbcaa292f14d793e3f3c (diff)
libxtables: Fix file descriptor leak in xtables_lmap_init on error
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'libxtables')
-rw-r--r--libxtables/xtoptions.c1
1 files changed, 1 insertions, 0 deletions
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;
}