All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Joshua Brindle <jbrindle@tresys.com>,
	SELinux List <SELinux@tycho.nsa.gov>
Subject: [SEPOL] Fix leak of optional package sections
Date: Fri, 31 Mar 2006 13:12:12 -0500	[thread overview]
Message-ID: <442D70FC.20404@cornell.edu> (raw)

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

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

[-- Attachment #2: libsepol.optionals_leak.diff --]
[-- Type: text/x-patch, Size: 742 bytes --]

diff -Naurp --exclude-from excludes old/libsepol/src/module.c new/libsepol/src/module.c
--- old/libsepol/src/module.c	2006-03-29 14:34:12.000000000 -0500
+++ new/libsepol/src/module.c	2006-03-31 13:02:23.000000000 -0500
@@ -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)
 

             reply	other threads:[~2006-03-31 18:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-31 18:12 Ivan Gyurdiev [this message]
2006-04-03 15:20 ` [SEPOL] Fix leak of optional package sections Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=442D70FC.20404@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=SELinux@tycho.nsa.gov \
    --cc=jbrindle@tresys.com \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.