rpms/PolicyKit/devel entry-leak.patch, NONE, 1.1 PolicyKit.spec, 1.21, 1.22

Matthias Clasen mclasen at fedoraproject.org
Fri Sep 19 23:18:24 UTC 2008


Author: mclasen

Update of /cvs/extras/rpms/PolicyKit/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3228

Modified Files:
	PolicyKit.spec 
Added Files:
	entry-leak.patch 
Log Message:
plug a memory leak


entry-leak.patch:

--- NEW FILE entry-leak.patch ---
diff -up PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c.entry-leak PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c
--- PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c.entry-leak	2008-08-29 21:47:22.000000000 -0400
+++ PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c	2008-08-29 21:50:13.000000000 -0400
@@ -95,9 +95,11 @@ _polkit_policy_file_entry_new   (const c
         char *contents;
         size_t contents_size;
         PolKitPolicyFileEntry *pfe;
+        char **tokens;
 
         path = NULL;
         contents = NULL;
+        tokens = NULL;
 
         kit_return_val_if_fail (action_id != NULL && polkit_action_validate_id (action_id), NULL);
 
@@ -153,7 +155,6 @@ _polkit_policy_file_entry_new   (const c
         }
 
         if (contents != NULL) {
-                char **tokens;
                 size_t num_tokens;
                 PolKitResult any;
                 PolKitResult inactive;
@@ -183,11 +184,13 @@ _polkit_policy_file_entry_new   (const c
 
         kit_free (path);
         kit_free (contents);
+        kit_strfreev (tokens);
 
         return pfe;
 error:
         kit_free (path);
         kit_free (contents);
+        kit_strfreev (tokens);
         if (pfe != NULL)
                 polkit_policy_file_entry_unref (pfe);
         return NULL;


Index: PolicyKit.spec
===================================================================
RCS file: /cvs/extras/rpms/PolicyKit/devel/PolicyKit.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- PolicyKit.spec	22 Jul 2008 23:10:14 -0000	1.21
+++ PolicyKit.spec	19 Sep 2008 23:17:53 -0000	1.22
@@ -14,12 +14,13 @@
 Summary: Authorization Toolkit
 Name: PolicyKit
 Version: 0.9
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
 Patch1: pk-ck-api-change.patch
+Patch2: entry-leak.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires(post): chkconfig
 Requires(preun): chkconfig
@@ -75,6 +76,7 @@
 %prep
 %setup -q
 %patch1 -p1 -b .api-change
+%patch2 -p1 -b .entry-leak
 
 %build
 %configure
@@ -168,6 +170,9 @@
 %{_datadir}/gtk-doc/html/polkit/*
 
 %changelog
+* Fri Sep 19 2008 Matthias Clasen <mclasen at redhat.com> - 0.9-3
+- Plug a memory leak
+
 * Tue Jul 22 2008 Jon McCann  <jmccann at redhat.com> - 0.9-2%{?dist}
 - Fix for CK API change
 




More information about the fedora-extras-commits mailing list