From: Christian Grothoff Date: Fri, 14 Oct 2011 09:39:11 +0000 (+0000) Subject: use after free X-Git-Tag: initial-import-from-subversion-38251~16521 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f2ce0c879c8f39f24d118104a79555171aedb904;p=oweals%2Fgnunet.git use after free --- diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index 8444658f3..845fe2117 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c @@ -346,10 +346,13 @@ process_rr_message (struct GNUNET_ATS_PerformanceHandle *ph, GNUNET_free (rc); return GNUNET_OK; } - GNUNET_free (rc); /* amount non-zero, but client cancelled, consider undo! */ if (GNUNET_YES != rc->undo) + { + GNUNET_free (rc); return GNUNET_OK; /* do not try to undo failed undos or negative amounts */ + } + GNUNET_free (rc); (void) GNUNET_ATS_reserve_bandwidth (ph, &rr->peer, -amount, NULL, NULL); return GNUNET_OK; }