diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2012-10-08 01:39:39 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2012-10-08 02:18:14 +0200 |
commit | 17cdd3faf35880c11a3dd0c747a5b10f373f975d (patch) | |
tree | c6366c56531a5edc7593e34de2d0daa79574bf80 /eurephiadm/commands/lastlog.c | |
parent | dce3988f9bc81d7291d56a4d838b434cd30bb5a9 (diff) | |
download | eurephia-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/lastlog.c')
-rw-r--r-- | eurephiadm/commands/lastlog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/eurephiadm/commands/lastlog.c b/eurephiadm/commands/lastlog.c index b65f1be..c18fbbb 100644 --- a/eurephiadm/commands/lastlog.c +++ b/eurephiadm/commands/lastlog.c @@ -1,7 +1,7 @@ /* lastlog.c -- eurephiadm lastlog command: * Queries the lastlog table * - * 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 @@ -136,6 +136,7 @@ int cmd_Lastlog(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, in case 'h': help_Lastlog(); + xmlFreeDoc(srch_xml); return 0; case 'c': @@ -182,6 +183,7 @@ int cmd_Lastlog(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, in default: fprintf(stderr, "%s: Invalid argument: %s\n", MODULE, argv[i-1]); + xmlFreeDoc(srch_xml); return 1; } } |