From e816db093b7d4e85eaa23661bb9dba851b1e534e Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 12 Feb 2013 12:59:08 +0000 Subject: [PATCH] auth: Avoid double free in key parsing There was an error path whilst reading an extended key file which could result in a key being freed using free(key), and then freed again through the afsconf_typedKey_put() mechanism. Remove this double free. Caught by clang-analyzer Change-Id: I40bff56eddf4cb499ae5b7effdaf82f22379109d Reviewed-on: http://gerrit.openafs.org/9147 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/auth/keys.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/auth/keys.c b/src/auth/keys.c index 9bfa67ac3..d3731c62b 100644 --- a/src/auth/keys.c +++ b/src/auth/keys.c @@ -522,7 +522,6 @@ _parseExtendedKeyFile(struct afsconf_dir *dir, char *fileName) code = read(fd, key->key.val, reclen); if (code != reclen) { rx_opaque_freeContents(&key->key); - free(key); goto fail; } code = addMemoryKey(dir, key, 1); -- 2.39.5