secur32: Stop memory leak (Coverity).

CID 1442946

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2019-03-03 22:05:19 +00:00 committed by Alexandre Julliard
parent de2854bebd
commit fb78d19881
1 changed files with 1 additions and 1 deletions

View File

@ -668,6 +668,7 @@ static BYTE *get_key_blob(const CERT_CONTEXT *ctx, ULONG *size)
heap_free(path);
return NULL;
}
heap_free(path);
if (!RegQueryValueExW(hkey, keyexchangeW, 0, &type, NULL, &len)) spec = AT_KEYEXCHANGE;
else if (!RegQueryValueExW(hkey, signatureW, 0, &type, NULL, &len)) spec = AT_SIGNATURE;
@ -699,7 +700,6 @@ static BYTE *get_key_blob(const CERT_CONTEXT *ctx, ULONG *size)
else heap_free(buf);
RegCloseKey(hkey);
heap_free(path);
return ret;
}