X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5c19dc3ae3bd8e40a9c028b0deddd50ff337692c..07691282a056c4efea71e1e505527601e8cc166b:/OSX/libsecurity_transform/lib/SecTransformReadTransform.cpp diff --git a/OSX/libsecurity_transform/lib/SecTransformReadTransform.cpp b/OSX/libsecurity_transform/lib/SecTransformReadTransform.cpp index 5d998cf3..e920746e 100644 --- a/OSX/libsecurity_transform/lib/SecTransformReadTransform.cpp +++ b/OSX/libsecurity_transform/lib/SecTransformReadTransform.cpp @@ -70,7 +70,6 @@ static SecTransformInstanceBlock StreamTransformImplementation(CFStringRef name, { return (CFTypeRef) CreateSecTransformErrorRef(kSecTransformErrorInvalidInput, "The read stream is in an error state"); } - break; default: // The assumption is that the stream is ready to go as is. @@ -92,7 +91,7 @@ static SecTransformInstanceBlock StreamTransformImplementation(CFStringRef name, SecTransformCustomSetAttribute(ref, kSecTransformOutputAttributeName, kSecTransformMetaAttributeValue, value); // cleanup - CFRelease(value); + CFReleaseNull(value); bytesRead = CFReadStreamRead(input, buffer, blockSize); } @@ -143,7 +142,7 @@ SecTransformRef SecTransformCreateReadTransformWithReadStream(CFReadStreamRef in // add the input to the transform SecTransformSetAttribute(transform, kSecTransformInputAttributeName, arrayRef, &result); - CFRelease(arrayRef); + CFReleaseNull(arrayRef); } return transform;