]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/security/audit/audit_bsd.c
xnu-3789.41.3.tar.gz
[apple/xnu.git] / bsd / security / audit / audit_bsd.c
index 6f4d416c941fdd77cb9d3a7fefdf431deb9af090..a08ab453d95c41b25411e9907df9e4823d478520 100644 (file)
@@ -51,6 +51,8 @@
 #include <mach/host_special_ports.h>
 #include <mach/audit_triggers_server.h>
 
+extern void ipc_port_release_send(ipc_port_t port);
+
 #if CONFIG_AUDIT
 struct mhdr {
        size_t                   mh_size;
@@ -650,7 +652,8 @@ audit_send_trigger(unsigned int trigger)
 
        error = host_get_audit_control_port(host_priv_self(), &audit_port);
        if (error == KERN_SUCCESS && audit_port != MACH_PORT_NULL) {
-               audit_triggers(audit_port, trigger);
+               (void)audit_triggers(audit_port, trigger);
+               ipc_port_release_send(audit_port);
                return (0);
        } else {
                printf("Cannot get audit control port\n");