diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-05-19 15:38:48 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-05-19 16:49:32 +0200 |
commit | 67f0eec47f4a6a704fbe93c5327136c5f8b77626 (patch) | |
tree | 7071171574c510ca57dcbe512577b46c793eb096 /src | |
parent | 5368b089d519764f076164d190e9c0f716e3b27b (diff) | |
download | abrt-67f0eec47f4a6a704fbe93c5327136c5f8b77626.tar.gz abrt-67f0eec47f4a6a704fbe93c5327136c5f8b77626.tar.xz abrt-67f0eec47f4a6a704fbe93c5327136c5f8b77626.zip |
fix tuns of memory leaks in CRPM
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Daemon/RPM.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Daemon/RPM.cpp b/src/Daemon/RPM.cpp index c40f9a07..50b03482 100644 --- a/src/Daemon/RPM.cpp +++ b/src/Daemon/RPM.cpp @@ -28,6 +28,8 @@ CRPM::CRPM() CRPM::~CRPM() { + rpmFreeCrypto(); + rpmFreeRpmrc(); rpmcliFini(m_poptContext); } @@ -48,6 +50,7 @@ void CRPM::LoadOpenGPGPublicKey(const char* pFileName) if (fedoraFingerprint != NULL) { m_setFingerprints.insert(fedoraFingerprint); + free(fedoraFingerprint); } } free(pkt); @@ -71,6 +74,7 @@ bool CRPM::CheckFingerprint(const char* pPackage) rpmtd td = rpmtdNew(); headerGet(header, rpmTags[ii] , td, HEADERGET_DEFAULT); char* pgpsig = rpmtdFormat(td, RPMTD_FORMAT_PGPSIG , NULL); + rpmtdFree(td); if (pgpsig) { std::string PGPSignatureText = pgpsig; @@ -81,7 +85,6 @@ bool CRPM::CheckFingerprint(const char* pPackage) { std::string headerFingerprint = PGPSignatureText.substr(Key_ID_pos + sizeof (" Key ID ") - 1); - rpmtdFree(td); if (headerFingerprint != "") { if (m_setFingerprints.find(headerFingerprint) != m_setFingerprints.end()) |