Commit b1a08ac7 authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

capi_get_key: check for NULL after allocating key

parent 86073227
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1498,6 +1498,8 @@ static CAPI_KEY *capi_get_key(CAPI_CTX *ctx, const TCHAR *contname, TCHAR *provn
	CAPI_KEY *key;
	DWORD dwFlags = 0; 
	key = OPENSSL_malloc(sizeof(CAPI_KEY));
	if (key == NULL)
		return NULL;
	if (sizeof(TCHAR)==sizeof(char))
		CAPI_trace(ctx, "capi_get_key, contname=%s, provname=%s, type=%d\n",
						contname, provname, ptype);