Package: dpkg
Version: 1.14.16.6
Severity: minor
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
found while checking for memory usage errors via valgrind.
sean
- -- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages dpkg depends on:
ii coreutils 6.10-3 The GNU core utilities
ii libc6 2.7-9 GNU C Library: Shared libraries
dpkg recommends no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHztJoynjLPm522B0RAuhEAJ9zI7HBfpni3VozsfORPtZBUO057ACdGmti
izJWwKiwL6CGeytRRkItNwE=
=TTSe
-----END PGP SIGNATURE-----
>From 3b36ceb9d1984dd5669efbf96670aeb74893e281 Mon Sep 17 00:00:00 2001
From: Sean Finney <[EMAIL PROTECTED]>
Date: Sat, 1 Mar 2008 09:44:09 +0100
Subject: [PATCH] small memory leak fixes
---
lib/dump.c | 2 ++
src/help.c | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/dump.c b/lib/dump.c
index 9e8bb0d..1154795 100644
--- a/lib/dump.c
+++ b/lib/dump.c
@@ -325,4 +325,6 @@ void writedb(const char *filename, int available, int mustsync) {
if (rename(newfn,filename))
ohshite(_("failed to install `%.250s' as `%.250s' containing %s info"),
newfn, filename, which);
+ free(newfn);
+ free(oldfn);
}
diff --git a/src/help.c b/src/help.c
index 3b9bc76..78e3b29 100644
--- a/src/help.c
+++ b/src/help.c
@@ -400,6 +400,7 @@ void clear_istobes(void) {
pkg->clientdata->istobe= itb_normal;
pkg->clientdata->replacingfilesandsaid= 0;
}
+ iterpkgend(it);
}
void debug(int which, const char *fmt, ...) {
--
1.5.4.3