Skip to contentSkip to conversation

Fix leak of optional package sections

SEPOL Ivan Gyurdiev 2 participants 2 messages Mar 31, 2006 – Apr 3, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

Sometimes it pays off to wait 5+ minutes for valgrind to process the semanage strict commit :)

libsepol/src/module.c +8 -6
diff -Naurp --exclude-from excludes old/libsepol/src/module.c new/libsepol/src/module.c
@@ -112,12 +112,14 @@ hidden_def(sepol_module_package_create)
  * the pointer itself.  Does nothing if p is NULL.
  */
 void sepol_module_package_free(sepol_module_package_t *p) {
-        if (p == NULL) {
-                return;
-        }
-        sepol_policydb_free(p->policy);
-        free(p->file_contexts);
-        free(p);
+	if (p == NULL)
+		return;
+
+	sepol_policydb_free(p->policy);
+	free(p->file_contexts);
+	free(p->seusers);
+	free(p->user_extra);
+	free(p);
 }
 hidden_def(sepol_module_package_free)
 
#1 lore raw
Quoted 2 lines · Ivan Gyurdiev

Sometimes it pays off to wait 5+ minutes for valgrind to process the semanage strict commit :)

Thanks, merged internally. sourceforge cvs is presently broken, so not there yet.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.