X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/fa7225c82381bac4432a6edf16f53b5370238d85..7e6b461318c8a779d91381531435a68ee4e8b6ed:/OSX/libsecurity_apple_csp/lib/desContext.cpp?ds=sidebyside diff --git a/OSX/libsecurity_apple_csp/lib/desContext.cpp b/OSX/libsecurity_apple_csp/lib/desContext.cpp index 43890cfd..22531e09 100644 --- a/OSX/libsecurity_apple_csp/lib/desContext.cpp +++ b/OSX/libsecurity_apple_csp/lib/desContext.cpp @@ -65,6 +65,7 @@ void DESContext::init( if (DesInst != NULL) { CCCryptorRelease(DesInst); + DesInst = NULL; } (void) CCCryptorCreateWithMode(0, kCCModeECB, kCCAlgorithmDES, ccDefaultPadding, NULL, keyData, kCCKeySizeDES, NULL, 0, 0, 0, &DesInst); @@ -152,6 +153,7 @@ void DES3Context::init( if (DesInst != NULL) { CCCryptorRelease(DesInst); + DesInst = NULL; } (void) CCCryptorCreateWithMode(0, kCCModeECB, kCCAlgorithm3DES, ccDefaultPadding, NULL, keyData, kCCKeySize3DES, NULL, 0, 0, 0, &DesInst);