- Fix Memory Leak

This commit is contained in:
Daniel J Walsh 2009-04-03 12:58:07 +00:00
parent 261c72abdb
commit d6eb0cea47
2 changed files with 16 additions and 1 deletions

View File

@ -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) 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 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 --- 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 +++ libselinux-2.0.79/src/Makefile 2009-03-27 14:21:35.000000000 -0400

View File

@ -5,7 +5,7 @@
Summary: SELinux library and simple utilities Summary: SELinux library and simple utilities
Name: libselinux Name: libselinux
Version: 2.0.79 Version: 2.0.79
Release: 5%{?dist} Release: 6%{?dist}
License: Public Domain License: Public Domain
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz
@ -164,6 +164,9 @@ exit 0
%{ruby_sitearch}/selinux.so %{ruby_sitearch}/selinux.so
%changelog %changelog
* Fri Apr 3 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.79-6
- Fix Memory Leak
* Thu Apr 2 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.79-5 * Thu Apr 2 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.79-5
- Fix crash in python - Fix crash in python