From 63a7bca1faf63c4abc075a2fc293dd58f0760a62 Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Mon, 31 Jan 2011 09:55:20 +0100 Subject: rhtsupport reads from uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit abrt-action-rhtsupport.c: In function ‘main’: abrt-action-rhtsupport.c:231:12: warning: ‘child’ may be used uninitialized in this function [-Wuninitialized] abrt-action-rhtsupport.c:45:11: note: ‘child’ was declared here ... ... pid_t child; ... ... if (!login[0] || !password[0]) { errmsg = _("Empty login or password, please check RHTSupport.conf"); goto ret; } ... ... ret: // Damn, selinux does not allow SIGKILLing our own child! wtf?? //kill(child, SIGKILL); /* just in case */ waitpid(child, NULL, 0); ... ... Signed-off-by: Nikola Pajkovsky --- src/plugins/abrt-action-rhtsupport.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/abrt-action-rhtsupport.c b/src/plugins/abrt-action-rhtsupport.c index 337adae1..d6d677ac 100644 --- a/src/plugins/abrt-action-rhtsupport.c +++ b/src/plugins/abrt-action-rhtsupport.c @@ -66,8 +66,12 @@ static void report_to_rhtsupport( if (!login[0] || !password[0]) { - errmsg = _("Empty login or password, please check RHTSupport.conf"); - goto ret; + free_crash_data(crash_data); + free(url); + free(login); + free(password); + error_msg_and_die(_("Empty login or password, please check RHTSupport.conf")); + return; } package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE); -- cgit