|
|
4b6aa8 |
From d10be6466e36650ae0598772ece838c9df0f9188 Mon Sep 17 00:00:00 2001
|
|
|
4b6aa8 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
Date: Wed, 22 Oct 2014 11:09:43 +0200
|
|
|
4b6aa8 |
Subject: [LIBREPORT PATCH 105/105] rhtsupport: do not leak the hints results
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
The leak was introduced in commit
|
|
|
4b6aa8 |
5ff7f36c1a06f5317241b43999f4f03a21594c79
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Related to rhbz#1139987
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
---
|
|
|
4b6aa8 |
src/plugins/reporter-rhtsupport.c | 13 +++++++++----
|
|
|
4b6aa8 |
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
|
|
4b6aa8 |
index 4b74c5c..add0d6b 100644
|
|
|
4b6aa8 |
--- a/src/plugins/reporter-rhtsupport.c
|
|
|
4b6aa8 |
+++ b/src/plugins/reporter-rhtsupport.c
|
|
|
4b6aa8 |
@@ -275,6 +275,7 @@ void attach_to_ureport(struct ureport_server_config *conf,
|
|
|
4b6aa8 |
static
|
|
|
4b6aa8 |
bool check_for_hints(const char *url, char **login, char **password, bool ssl_verify, const char *tempfile)
|
|
|
4b6aa8 |
{
|
|
|
4b6aa8 |
+ bool retval = false;
|
|
|
4b6aa8 |
rhts_result_t *result = NULL;
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
INVALID_CREDENTIALS_LOOP((*login), (*password),
|
|
|
4b6aa8 |
@@ -317,14 +318,18 @@ bool check_for_hints(const char *url, char **login, char **password, bool ssl_ve
|
|
|
4b6aa8 |
hint = append_to_malloced_string(hint,
|
|
|
4b6aa8 |
_("Do you still want to create a RHTSupport ticket?")
|
|
|
4b6aa8 |
);
|
|
|
4b6aa8 |
- int create_ticket = ask_yes_no(hint);
|
|
|
4b6aa8 |
+
|
|
|
4b6aa8 |
+ /*
|
|
|
4b6aa8 |
+ * 'Yes' to the create ticket question means no hints were found.
|
|
|
4b6aa8 |
+ */
|
|
|
4b6aa8 |
+ retval = !ask_yes_no(hint);
|
|
|
4b6aa8 |
+
|
|
|
4b6aa8 |
free(hint);
|
|
|
4b6aa8 |
- if (!create_ticket)
|
|
|
4b6aa8 |
- return true;
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
+
|
|
|
4b6aa8 |
free_rhts_result(result);
|
|
|
4b6aa8 |
- return false;
|
|
|
4b6aa8 |
+ return retval;
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
static
|
|
|
4b6aa8 |
--
|
|
|
4b6aa8 |
1.8.3.1
|
|
|
4b6aa8 |
|