From 6fa62e4d8ab3e5108de7cb4389f22528ec255f91e4aef13316adaf1d50e1e63c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 23 Apr 2009 16:30:16 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libselinux?expand=0&rev=7 --- libselinux-2.0.77-memleak.patch | 11 +++++++++++ libselinux-bindings.changes | 5 +++++ libselinux-bindings.spec | 6 +++++- libselinux.changes | 5 +++++ libselinux.spec | 6 +++++- 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 libselinux-2.0.77-memleak.patch diff --git a/libselinux-2.0.77-memleak.patch b/libselinux-2.0.77-memleak.patch new file mode 100644 index 0000000..81d3f25 --- /dev/null +++ b/libselinux-2.0.77-memleak.patch @@ -0,0 +1,11 @@ +--- src/label_file.c ++++ src/label_file.c +@@ -299,6 +299,8 @@ + COMPAT_LOG(SELINUX_WARNING, + "%s: line %d is missing fields, skipping\n", path, + lineno); ++ if (items == 1) ++ free(regex); + return 0; + } else if (items == 2) { + /* The type field is optional. */ diff --git a/libselinux-bindings.changes b/libselinux-bindings.changes index 480e36c..0eb7c58 100644 --- a/libselinux-bindings.changes +++ b/libselinux-bindings.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 17 17:12:06 CEST 2009 - prusnak@suse.cz + +- fixed memory leak (memleak.patch) + ------------------------------------------------------------------- Wed Jan 14 14:04:30 CET 2009 - prusnak@suse.cz diff --git a/libselinux-bindings.spec b/libselinux-bindings.spec index 3d33973..4d474aa 100644 --- a/libselinux-bindings.spec +++ b/libselinux-bindings.spec @@ -23,13 +23,14 @@ BuildRequires: libsepol-devel >= %{libsepol_ver} Name: libselinux-bindings Version: 2.0.77 -Release: 1 +Release: 2 Url: http://www.nsa.gov/selinux/ License: GPL v2 only; Public Domain, Freeware Group: System/Libraries Summary: SELinux library and simple utilities Source: libselinux-%{version}.tar.bz2 Patch0: libselinux-%{version}-rhat.patch.bz2 +Patch1: libselinux-%{version}-memleak.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define debug_package_requires python-selinux = %{version}-%{release} @@ -101,6 +102,7 @@ decisions. Required for any applications that use the SELinux API. %prep %setup -q -n libselinux-%{version} %patch0 -p1 +%patch1 %build make %{?jobs:-j%jobs} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src @@ -127,6 +129,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/selinux.so %changelog +* Fri Apr 17 2009 prusnak@suse.cz +- fixed memory leak (memleak.patch) * Wed Jan 14 2009 prusnak@suse.cz - updated to 2.0.77 * add new function getseuser which will take username and service diff --git a/libselinux.changes b/libselinux.changes index 480e36c..0eb7c58 100644 --- a/libselinux.changes +++ b/libselinux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 17 17:12:06 CEST 2009 - prusnak@suse.cz + +- fixed memory leak (memleak.patch) + ------------------------------------------------------------------- Wed Jan 14 14:04:30 CET 2009 - prusnak@suse.cz diff --git a/libselinux.spec b/libselinux.spec index b5a9b1c..8ec1b7a 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -22,13 +22,14 @@ BuildRequires: libsepol-devel >= %{libsepol_ver} Name: libselinux Version: 2.0.77 -Release: 1 +Release: 2 Url: http://www.nsa.gov/selinux/ License: GPL v2 only; Public Domain, Freeware Group: System/Libraries Summary: SELinux library and simple utilities Source: %{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-rhat.patch.bz2 +Patch1: %{name}-%{version}-memleak.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define debug_package_requires libselinux1 = %{version}-%{release} @@ -119,6 +120,7 @@ necessary to develop your own software using libselinux. %prep %setup -q %patch0 -p1 +%patch1 %build make %{?jobs:-j%jobs} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" @@ -182,6 +184,8 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog +* Fri Apr 17 2009 prusnak@suse.cz +- fixed memory leak (memleak.patch) * Wed Jan 14 2009 prusnak@suse.cz - updated to 2.0.77 * add new function getseuser which will take username and service