On Mon, 2011-01-31 at 10:01 +0100, Nikola Pajkovsky wrote:
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(a)redhat.com>
---
src/plugins/abrt-action-rhtsupport.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/plugins/abrt-action-rhtsupport.c b/src/plugins/abrt-action-rhtsupport.c
index 337adae..d6d677a 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;
Neither free calls before error_msg_and_die, not return after it are
needed.
--
vda