From 17cdd3faf35880c11a3dd0c747a5b10f373f975d Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 8 Oct 2012 01:39:39 +0200 Subject: 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 --- eurephiadm/commands/lastlog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'eurephiadm/commands/lastlog.c') 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 * * 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; } } -- cgit