]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netlabel/netlabel_user.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / net / netlabel / netlabel_user.c
index 42f12bd65964e3223aa016bfbd044869a6a07a88..85a96a3fddaafdaa016dbdd14aea0f9433d8c22e 100644 (file)
 #include "netlabel_cipso_v4.h"
 #include "netlabel_user.h"
 
-/* do not do any auditing if audit_enabled == 0, see kernel/audit.c for
- * details */
-extern int audit_enabled;
-
 /*
  * NetLabel NETLINK Setup Functions
  */
@@ -117,8 +113,10 @@ struct audit_buffer *netlbl_audit_start_common(int type,
        if (audit_info->secid != 0 &&
            security_secid_to_secctx(audit_info->secid,
                                     &secctx,
-                                    &secctx_len) == 0)
+                                    &secctx_len) == 0) {
                audit_log_format(audit_buf, " subj=%s", secctx);
+               security_release_secctx(secctx, secctx_len);
+       }
 
        return audit_buf;
 }