Loading...
libkern/c++/OSDictionary.cpp xnu-517.9.4 xnu-344
--- xnu/xnu-517.9.4/libkern/c++/OSDictionary.cpp
+++ xnu/xnu-344/libkern/c++/OSDictionary.cpp
@@ -76,7 +76,7 @@
 bool OSDictionary::initWithObjects(const OSObject *objects[],
                                    const OSSymbol *keys[],
                                    unsigned int theCount,
-                                   unsigned int theCapacity)
+                                   unsigned int theCapacity = 0)
 {
     unsigned int capacity = theCount;
 
@@ -106,7 +106,7 @@
 bool OSDictionary::initWithObjects(const OSObject *objects[],
                                    const OSString *keys[],
                                    unsigned int theCount,
-                                   unsigned int theCapacity)
+                                   unsigned int theCapacity = 0)
 {
     unsigned int capacity = theCount;
 
@@ -142,7 +142,7 @@
 }
 
 bool OSDictionary::initWithDictionary(const OSDictionary *dict,
-                                      unsigned int theCapacity)
+                                      unsigned int theCapacity = 0)
 {
     unsigned int capacity;
 
@@ -176,7 +176,7 @@
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithCapacity(capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -186,12 +186,12 @@
 OSDictionary *OSDictionary::withObjects(const OSObject *objects[],
                                         const OSSymbol *keys[],
                                         unsigned int count,
-                                        unsigned int capacity)
+                                        unsigned int capacity = 0)
 {
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithObjects(objects, keys, count, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -201,12 +201,12 @@
 OSDictionary *OSDictionary::withObjects(const OSObject *objects[],
                                         const OSString *keys[],
                                         unsigned int count,
-                                        unsigned int capacity)
+                                        unsigned int capacity = 0)
 {
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithObjects(objects, keys, count, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -214,12 +214,12 @@
 }
 
 OSDictionary *OSDictionary::withDictionary(const OSDictionary *dict,
-                                           unsigned int capacity)
+                                           unsigned int capacity = 0)
 {
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithDictionary(dict, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }