From f2ce0c879c8f39f24d118104a79555171aedb904 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 14 Oct 2011 09:39:11 +0000 Subject: [PATCH] use after free --- src/ats/ats_api_performance.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.25.1