summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Nicoletti <dantti12@gmail.com>2012-04-17 05:25:03 -0300
committerDaniel Nicoletti <dantti12@gmail.com>2012-04-17 05:25:03 -0300
commit8acfcf399aa9fb1acea1732f6872ea4dc2af4cfd (patch)
tree2913b6190e583ae7930ae406d63e783263673576
parent0e5f551fd3bd930e1d31b376cd576a0f36a85c94 (diff)
aptcc: Fix a few mem leaks
-rw-r--r--backends/aptcc/apt-intf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/aptcc/apt-intf.cpp b/backends/aptcc/apt-intf.cpp
index 76d31ef6..cbcbfcbf 100644
--- a/backends/aptcc/apt-intf.cpp
+++ b/backends/aptcc/apt-intf.cpp
@@ -84,14 +84,17 @@ bool AptIntf::init()
// _locale.erase(found);
// _config->Set("APT::Acquire::Translation", _locale);
}
+ g_free(locale);
// set http proxy
http_proxy = pk_backend_get_proxy_http(m_backend);
setenv("http_proxy", http_proxy, 1);
+ g_free(http_proxy);
// set ftp proxy
ftp_proxy = pk_backend_get_proxy_ftp(m_backend);
setenv("ftp_proxy", ftp_proxy, 1);
+ g_free(ftp_proxy);
// Tries to open the cache
bool ret;
@@ -2579,6 +2582,7 @@ bool AptIntf::installPackages(AptCacheFile &cache, bool simulating)
// we don't have a socket set, let's fallback to noninteractive
setenv("DEBIAN_FRONTEND", "noninteractive", 1);
}
+ g_free(socket);
gchar *locale;
// Set the LANGUAGE so debconf messages get localization
@@ -2587,6 +2591,7 @@ bool AptIntf::installPackages(AptCacheFile &cache, bool simulating)
setenv("LANG", locale, 1);
//setenv("LANG", "C", 1);
}
+ g_free(locale);
// Pass the write end of the pipe to the install function
res = PM->DoInstallPostFork(readFromChildFD[1]);