All of lore.kernel.org
 help / color / mirror / Atom feed
* [SEMANAGE] Fix memory leak in clear_obsolete
@ 2005-12-13  0:35 Ivan Gyurdiev
  0 siblings, 0 replies; only message in thread
From: Ivan Gyurdiev @ 2005-12-13  0:35 UTC (permalink / raw)
  To: SELinux List; +Cc: Stephen Smalley

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: libsemanage.components_memory_leak.diff --]
[-- Type: text/x-patch, Size: 634 bytes --]

diff -Naurp --exclude-from excludes old/libsemanage/src/policy_components.c new/libsemanage/src/policy_components.c
--- old/libsemanage/src/policy_components.c	2005-11-16 09:32:34.000000000 -0500
+++ new/libsemanage/src/policy_components.c	2005-12-12 18:55:28.000000000 -0500
@@ -44,12 +44,13 @@ static int clear_obsolete(
 			/* FIXME: notice to user */	
                         /* INFO(handle, "boolean %s is obsolete, unsetting configured value..."); */
 		}
+
+		rtable->key_free(key);
 	}
 
 	for (i=0; i < nrecords; i++)	
 		rtable->free(records[i]);
 	free(records);
-	rtable->key_free(key);
 	return STATUS_SUCCESS;
 
 	err:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-13  0:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-13  0:35 [SEMANAGE] Fix memory leak in clear_obsolete Ivan Gyurdiev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.