]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ipc/ipc_object.c
xnu-1456.1.26.tar.gz
[apple/xnu.git] / osfmk / ipc / ipc_object.c
index 0ca7095eea61bdb45d2d6301cf71f71e0f55c6d1..4b1dc1c85ee8268cf9751432bae859831b337490 100644 (file)
@@ -355,7 +355,7 @@ ipc_object_alloc(
        }
 
        io_lock_init(object);
        }
 
        io_lock_init(object);
-       *namep = (mach_port_name_t)object;
+       *namep = CAST_MACH_PORT_TO_NAME(object);
        kr = ipc_entry_alloc(space, namep, &entry);
        if (kr != KERN_SUCCESS) {
                io_free(otype, object);
        kr = ipc_entry_alloc(space, namep, &entry);
        if (kr != KERN_SUCCESS) {
                io_free(otype, object);
@@ -728,7 +728,7 @@ ipc_object_copyout(
                        break;
                }
 
                        break;
                }
 
-               name = (mach_port_name_t)object;
+               name = CAST_MACH_PORT_TO_NAME(object);
                kr = ipc_entry_get(space, &name, &entry);
                if (kr != KERN_SUCCESS) {
                        /* unlocks/locks space, so must start again */
                kr = ipc_entry_get(space, &name, &entry);
                if (kr != KERN_SUCCESS) {
                        /* unlocks/locks space, so must start again */
@@ -1019,7 +1019,7 @@ struct label *io_getlabel (ipc_object_t objp)
                return &port->ip_label;
 }
 #endif
                return &port->ip_label;
 }
 #endif
-#if MACH_ASSERT || CONFIG_MACF_MACH
+
 /*
  *     Check whether the object is a port if so, free it.  But
  *     keep track of that fact.
 /*
  *     Check whether the object is a port if so, free it.  But
  *     keep track of that fact.
@@ -1042,9 +1042,9 @@ io_free(
                mac_port_label_destroy(&port->ip_label);
 #endif   
        }
                mac_port_label_destroy(&port->ip_label);
 #endif   
        }
+       io_lock_destroy(object);
        zfree(ipc_object_zones[otype], object);
 }
        zfree(ipc_object_zones[otype], object);
 }
-#endif         /* MACH_ASSER || MAC */
 
 #include <mach_kdb.h>
 #if    MACH_KDB
 
 #include <mach_kdb.h>
 #if    MACH_KDB
@@ -1093,6 +1093,7 @@ const char *ikot_print_array[IKOT_MAX_TYPE] = {
        "(IOKIT_OBJECT)     ",  /* 30 */
        "(UPL)              ",
        "(MEM_OBJ_CONTROL)  ",
        "(IOKIT_OBJECT)     ",  /* 30 */
        "(UPL)              ",
        "(MEM_OBJ_CONTROL)  ",
+       "(AU_SESSIONPORT)   ",  /* 33 */
 #if CONFIG_MACF_MACH
        "(LABELH)           ",
 #endif
 #if CONFIG_MACF_MACH
        "(LABELH)           ",
 #endif