summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2011-01-31 09:55:20 +0100
committerNikola Pajkovsky <npajkovs@redhat.com>2011-02-01 12:20:11 +0100
commit63a7bca1faf63c4abc075a2fc293dd58f0760a62 (patch)
treec885ab8cb3fe0a164b20196acb3f55967176d0fa
parentc70fa17930b0150e5c49224c292da0508429a8eb (diff)
downloadabrt-63a7bca1faf63c4abc075a2fc293dd58f0760a62.tar.gz
abrt-63a7bca1faf63c4abc075a2fc293dd58f0760a62.tar.xz
abrt-63a7bca1faf63c4abc075a2fc293dd58f0760a62.zip
rhtsupport reads from uninitialized variable
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 <npajkovs@redhat.com>
-rw-r--r--src/plugins/abrt-action-rhtsupport.c8
1 files changed, 6 insertions, 2 deletions
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);