From: Nick Mathewson Date: Fri, 5 Dec 2008 01:29:59 +0000 (+0000) Subject: Fix a hard-to-trigger memory leak in log_credential status. Found by Coverity scan... X-Git-Tag: tor-0.2.1.8-alpha~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2be52151816dbec0d9548362775c9bc5de46372e;p=thirdparty%2Ftor.git Fix a hard-to-trigger memory leak in log_credential status. Found by Coverity scan. CID 349. svn:r17484 --- diff --git a/ChangeLog b/ChangeLog index b5438817b6..25756ddcf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,9 @@ Changes in version 0.2.1.8-alpha - 2008-??-?? - Correct handling of possible malformed authority signing key certificates with internal signature types. Fixes bug 880. Bugfix on 0.2.0.3-alpha. + - Fix a hard-to-trigger resource leak when logging credential status. + CID 349. + - o Minor features: - Report the case where all signatures in a detached set are rejected diff --git a/src/common/compat.c b/src/common/compat.c index fcc57f60db..9ce5885dc1 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -1049,17 +1049,17 @@ log_credential_status(void) strerror(errno)); return -1; } else { - int i; + int i, retval = 0; char *strgid; char *s = NULL; - int formatting_error = 0; smartlist_t *elts = smartlist_create(); for (i = 0; i