Loading...
libkern/c++/OSBoolean.cpp xnu-517.7.7 xnu-201.19
--- xnu/xnu-517.7.7/libkern/c++/OSBoolean.cpp
+++ xnu/xnu-201.19/libkern/c++/OSBoolean.cpp
@@ -76,12 +76,15 @@
     assert(false);
 }
 
-void OSBoolean::taggedRetain(const void *tag) const { }
-void OSBoolean::taggedRelease(const void *tag, const int when) const { }
-
 OSBoolean *OSBoolean::withBoolean(bool inValue)
 {
-    return (inValue) ? kOSBooleanTrue : kOSBooleanFalse;
+    if (inValue) {
+        kOSBooleanTrue->retain();
+        return kOSBooleanTrue;
+    } else {
+        kOSBooleanFalse->retain();
+        return kOSBooleanFalse;
+    }
 }
 
 bool OSBoolean::isTrue() const { return value; }