Loading...
libkern/c++/OSString.cpp xnu-201.5 xnu-792.24.17
--- xnu/xnu-201.5/libkern/c++/OSString.cpp
+++ xnu/xnu-792.24.17/libkern/c++/OSString.cpp
@@ -22,11 +22,13 @@
 /* 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
 
@@ -96,7 +98,7 @@
     OSString *me = new OSString;
 
     if (me && !me->initWithString(aString)) {
-        me->free();
+        me->release();
         return 0;
     }
 
@@ -108,7 +110,7 @@
     OSString *me = new OSString;
 
     if (me && !me->initWithCString(cString)) {
-        me->free();
+        me->release();
         return 0;
     }
 
@@ -120,7 +122,7 @@
     OSString *me = new OSString;
 
     if (me && !me->initWithCStringNoCopy(cString)) {
-        me->free();
+        me->release();
         return 0;
     }