Loading...
libkern/c++/OSString.cpp xnu-792.6.61 xnu-201.42.3
--- xnu/xnu-792.6.61/libkern/c++/OSString.cpp
+++ xnu/xnu-201.42.3/libkern/c++/OSString.cpp
@@ -22,13 +22,11 @@
 /* IOString.m created by rsulack on Wed 17-Sep-1997 */
 /* IOString.cpp converted to C++ on Tue 1998-9-22 */
 
-#include <string.h>
 
 #include <libkern/c++/OSString.h>
 #include <libkern/c++/OSSerialize.h>
 #include <libkern/c++/OSLib.h>
 #include <libkern/c++/OSData.h>
-#include <string.h>
 
 #define super OSObject
 
@@ -98,7 +96,7 @@
     OSString *me = new OSString;
 
     if (me && !me->initWithString(aString)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -110,7 +108,7 @@
     OSString *me = new OSString;
 
     if (me && !me->initWithCString(cString)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -122,7 +120,7 @@
     OSString *me = new OSString;
 
     if (me && !me->initWithCStringNoCopy(cString)) {
-        me->release();
+        me->free();
         return 0;
     }