From: Olivier Roques Date: Wed, 8 Jan 2020 12:04:48 +0000 (+0100) Subject: [CICN-27] Fix invalid pointer dealloc X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F38%2F24238%2F1;p=cicn.git [CICN-27] Fix invalid pointer dealloc There is a deallocation of an invalid pointer in the destructor of an in-memory verifier object. This function is called by the destructor of consumer socket which fails because of that. The bug is visible only on Ubuntu 16.04. The bug was introduced in CICN-26 as an artifact of attempts to fix memory leaks in Android. There is no good reason to keep the changes causing the problem and the concerned lines can be safely removed. Signed-off-by: Olivier Roques Change-Id: Ibcde7dd7510d76f5aa91e5967a4261ec7eb49108 --- diff --git a/libparc/parc/security/parc_InMemoryVerifier.c b/libparc/parc/security/parc_InMemoryVerifier.c index 00dddf46..b713abce 100644 --- a/libparc/parc/security/parc_InMemoryVerifier.c +++ b/libparc/parc/security/parc_InMemoryVerifier.c @@ -51,8 +51,6 @@ _parcInMemoryVerifier_Destructor(PARCInMemoryVerifier **verifierPtr) parcCryptoHasher_Release(&(verifier->hasher_sha256)); parcCryptoHasher_Release(&(verifier->hasher_sha512)); parcCryptoCache_Destroy(&(verifier->key_cache)); - parcMemory_Deallocate((void **)verifierPtr); - *verifierPtr = NULL; return true; }