On Mon, Apr 20, 2015 at 16:30 +0200, Yegor Yefremov wrote:
> Release pCertName, if SecCertificateCopyValues() fails.
> 
> Found via cppcheck.
> 
> Signed-off-by: Yegor Yefremov <yegorsli...@googlemail.com>
> Cc: Vasily Kulikov <seg...@openwall.com>

Acked-by: Vasily Kulikov <seg...@openwall.com>

Thank you!

> ---
>  contrib/keychain-mcd/cert_data.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/contrib/keychain-mcd/cert_data.c 
> b/contrib/keychain-mcd/cert_data.c
> index f2b33ed..a04bf79 100644
> --- a/contrib/keychain-mcd/cert_data.c
> +++ b/contrib/keychain-mcd/cert_data.c
> @@ -146,6 +146,7 @@ CFArrayRef GetFieldsFromCertificate(SecCertificateRef 
> certificate, CFTypeRef oid
>        printErrorMsg("GetFieldsFromCertificate: SecCertificateCopyValues", 
> error);
>        CFRelease(keySelection);
>        CFRelease(fields);
> +      destroyCertName(pCertName);
>        return NULL;
>    }
>    CFDictionaryRef vals = CFDictionaryGetValue(dict, oid);
> -- 
> 2.1.0

-- 
Vasily Kulikov
http://www.openwall.com - bringing security into open computing environments

Reply via email to