if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0)
goto err;
free(abuf);
+ abuf = NULL;
if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
goto err;
abuf = malloc(siglen);
return 1;
err:
- if (abuf)
- free(abuf);
+ free(abuf);
EVP_MD_CTX_cleanup(&mctx);
return 0;
if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0)
goto err;
free(abuf);
+ abuf = NULL;
if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
goto err;
abuf = malloc(siglen);
return 1;
err:
- if (abuf)
- free(abuf);
+ free(abuf);
EVP_MD_CTX_cleanup(&mctx);
return 0;