From d6eb0cea47048deacf99119905e3616a837a040e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 3 Apr 2009 12:58:07 +0000 Subject: [PATCH] - Fix Memory Leak --- libselinux-rhat.patch | 12 ++++++++++++ libselinux.spec | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 5c3a371..e576a98 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -257,6 +257,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/label.c libselinux-2.0.79 } void selabel_stats(struct selabel_handle *rec) +diff --exclude-from=exclude -N -u -r nsalibselinux/src/label_file.c libselinux-2.0.79/src/label_file.c +--- nsalibselinux/src/label_file.c 2009-03-06 14:41:45.000000000 -0500 ++++ libselinux-2.0.79/src/label_file.c 2009-04-03 08:57:05.000000000 -0400 +@@ -299,6 +299,8 @@ + COMPAT_LOG(SELINUX_WARNING, + "%s: line %d is missing fields, skipping\n", path, + lineno); ++ if (items == 1) ++ freee(regex); + return 0; + } else if (items == 2) { + /* The type field is optional. */ diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.79/src/Makefile --- nsalibselinux/src/Makefile 2009-03-06 14:41:45.000000000 -0500 +++ libselinux-2.0.79/src/Makefile 2009-03-27 14:21:35.000000000 -0400 diff --git a/libselinux.spec b/libselinux.spec index 5550281..6e673fd 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -5,7 +5,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.0.79 -Release: 5%{?dist} +Release: 6%{?dist} License: Public Domain Group: System Environment/Libraries Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz @@ -164,6 +164,9 @@ exit 0 %{ruby_sitearch}/selinux.so %changelog +* Fri Apr 3 2009 Dan Walsh - 2.0.79-6 +- Fix Memory Leak + * Thu Apr 2 2009 Dan Walsh - 2.0.79-5 - Fix crash in python