summaryrefslogtreecommitdiffstats
path: root/eurephiadm/commands/fwprofiles.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2012-10-08 01:39:39 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-10-08 02:18:14 +0200
commit17cdd3faf35880c11a3dd0c747a5b10f373f975d (patch)
treec6366c56531a5edc7593e34de2d0daa79574bf80 /eurephiadm/commands/fwprofiles.c
parentdce3988f9bc81d7291d56a4d838b434cd30bb5a9 (diff)
downloadeurephia-17cdd3faf35880c11a3dd0c747a5b10f373f975d.tar.gz
eurephia-17cdd3faf35880c11a3dd0c747a5b10f373f975d.tar.xz
eurephia-17cdd3faf35880c11a3dd0c747a5b10f373f975d.zip
eurephiadm: Removed several memleaks in error situations or when --help was used
Most of the eurephiadm commands leaked some memory if an error occured or the --help screen was requested. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'eurephiadm/commands/fwprofiles.c')
-rw-r--r--eurephiadm/commands/fwprofiles.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eurephiadm/commands/fwprofiles.c b/eurephiadm/commands/fwprofiles.c
index b62ee08..737f383 100644
--- a/eurephiadm/commands/fwprofiles.c
+++ b/eurephiadm/commands/fwprofiles.c
@@ -1,7 +1,7 @@
/* fwprofiles.c -- eurephiadm fwprofiles command:
* Manages firewall profiles
*
- * GPLv2 only - Copyright (C) 2009 - 2010
+ * GPLv2 only - Copyright (C) 2009 - 2012
* David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
@@ -211,9 +211,11 @@ int list_profiles(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg,
case 'h':
display_fwprofiles_help('l');
+ xmlFreeDoc(srch_xml);
return 0;
default:
+ xmlFreeDoc(srch_xml);
return 1;
}
}