Nullify destroyed pointer. 63/66163/1
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>
Thu, 14 Apr 2016 14:52:58 +0000 (16:52 +0200)
committerLukasz Pawelczyk <l.pawelczyk@samsung.com>
Fri, 15 Apr 2016 12:48:28 +0000 (14:48 +0200)
Change-Id: I40384227010a733499b05bf6b587a1ec125505df

src/digest.c

index 9c50748..2a5f01d 100644 (file)
@@ -67,6 +67,7 @@ static void destroy_digest_context(yaca_ctx_h ctx)
                return;
 
        EVP_MD_CTX_destroy(c->mdctx);
+       c->mdctx = NULL;
 }
 
 int digest_get_algorithm(yaca_digest_algo_e algo, const EVP_MD **md)