- get rid of 1.6M per bdev leak when probing. yippie.

This commit is contained in:
Peter Jones 2006-09-05 19:51:40 +00:00
parent ce00beaec0
commit e536f6819e
2 changed files with 23 additions and 1 deletions

16
e2fsprogs-1.39-leak.patch Normal file
View File

@ -0,0 +1,16 @@
--- e2fsprogs-1.39/lib/blkid/probe.c.leak 2006-09-05 15:41:13.000000000 -0400
+++ e2fsprogs-1.39/lib/blkid/probe.c 2006-09-05 15:40:19.000000000 -0400
@@ -884,7 +884,12 @@
}
if (!dev->bid_type) {
- if (probe.fd >= 0) close(probe.fd);
+ if (probe.fd >= 0)
+ close(probe.fd);
+ if (probe.sbbuf)
+ free(probe.sbbuf);
+ if (probe.buf)
+ free(probe.buf);
blkid_free_dev(dev);
return NULL;
}

View File

@ -4,7 +4,7 @@
Summary: Utilities for managing the second extended (ext2) filesystem. Summary: Utilities for managing the second extended (ext2) filesystem.
Name: e2fsprogs Name: e2fsprogs
Version: 1.39 Version: 1.39
Release: 4 Release: 5
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
@ -16,6 +16,7 @@ Patch36: e2fsprogs-1.38-etcblkid.patch
Patch37: e2fsprogs-1.39-blkid-gfs.patch Patch37: e2fsprogs-1.39-blkid-gfs.patch
Patch38: e2fsprogs-1.39-blkid-devname.patch Patch38: e2fsprogs-1.39-blkid-devname.patch
Patch39: e2fsprogs-1.39-multilib.patch Patch39: e2fsprogs-1.39-multilib.patch
Patch40: e2fsprogs-1.39-leak.patch
Url: http://e2fsprogs.sourceforge.net/ Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper
@ -77,6 +78,8 @@ also want to install e2fsprogs.
%patch38 -p1 -b .devname %patch38 -p1 -b .devname
# Fix multilib conflicts # Fix multilib conflicts
%patch39 -p1 -b .multilib %patch39 -p1 -b .multilib
# Fix probing from leaking memory in error cases.
%patch40 -p1 -b .leak
%build %build
aclocal aclocal
@ -228,6 +231,9 @@ exit 0
%{_mandir}/man3/uuid_unparse.3* %{_mandir}/man3/uuid_unparse.3*
%changelog %changelog
* Tue Sep 5 2006 Peter Jones <pjones@redhat.com> - 1.39-5
- Fix memory leak in device probing.
* Mon Jul 24 2006 Thomas Woerner <twoerner@redhat.com> - 1.39-4 * Mon Jul 24 2006 Thomas Woerner <twoerner@redhat.com> - 1.39-4
- fixed multilib devel conflicts (#192665) - fixed multilib devel conflicts (#192665)