]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_transform/lib/SingleShotSource.cpp
Security-58286.20.16.tar.gz
[apple/security.git] / OSX / libsecurity_transform / lib / SingleShotSource.cpp
index f5121f213de6a62e9f619c0b27c7f1cb3ccf04cf..9d5f25748981377f1951995bf95ef4471d9a336e 100644 (file)
@@ -1,5 +1,6 @@
 
 #include "SingleShotSource.h"
+#include "Utilities.h"
 #include <string>
 
 using namespace std;
@@ -15,7 +16,7 @@ SingleShotSource::SingleShotSource(CFTypeRef value, Transform* t, CFStringRef na
 void SingleShotSource::DoActivate()
 {
        // Make sure our destination doesn't vanish while we are sending it data (or the final NULL)
-       CFRetain(mDestination->GetCFObject());
+       CFRetainSafe(mDestination->GetCFObject());
        
        // take our value and send it on its way
        mDestination->SetAttribute(mDestinationName, GetValue());
@@ -23,7 +24,7 @@ void SingleShotSource::DoActivate()
        // send an end of stream
        mDestination->SetAttribute(mDestinationName, NULL);
 
-       CFRelease(mDestination->GetCFObject());
+       CFReleaseSafe(mDestination->GetCFObject());
 }