summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Catcut.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-30 14:01:59 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-30 14:01:59 +0100
commitb19716454b2cf37b6bbce927467b504704f1420d (patch)
tree295afdc0d69f15653736b8978c0c568e3ff69258 /lib/Plugins/Catcut.cpp
parent995bb1352eb5a461047d0acfc5f9648270c9b446 (diff)
downloadabrt-b19716454b2cf37b6bbce927467b504704f1420d.tar.gz
abrt-b19716454b2cf37b6bbce927467b504704f1420d.tar.xz
abrt-b19716454b2cf37b6bbce927467b504704f1420d.zip
Bugzilla: fix some memory leaks. More reamins on error path...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/Catcut.cpp')
-rw-r--r--lib/Plugins/Catcut.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
index ad55b2a..c833a57 100644
--- a/lib/Plugins/Catcut.cpp
+++ b/lib/Plugins/Catcut.cpp
@@ -92,6 +92,9 @@ static string login(const char* login, const char* passwd)
xmlrpc_read_string(&env, cookie_xml, &cookie);
throw_if_xml_fault_occurred();
cookie_str = cookie;
+ /* xmlrpc_read_string returns *malloc'ed ptr*.
+ * doc is not very clear on it, but I looked in xmlrpc sources. */
+ free((void*)cookie);
xmlrpc_DECREF(cookie_xml);
xmlrpc_DECREF(result);
@@ -240,6 +243,7 @@ static string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashR
bug_id_str = bug_id;
log("New bug id: %s", bug_id);
update_client(_("New bug id: ") + bug_id_str);
+ free((void*)bug_id);
xmlrpc_DECREF(bug_id_xml);
xmlrpc_DECREF(result);