aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-14 09:39:11 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-14 09:39:11 +0000
commitf2ce0c879c8f39f24d118104a79555171aedb904 (patch)
treec3ac1ba5c427eddc591bb85afc6bfb5f32ef73ad
parent59bb7d30777c83e9e22b2199cd18ee86f10b3035 (diff)
downloadgnunet-f2ce0c879c8f39f24d118104a79555171aedb904.tar.gz
gnunet-f2ce0c879c8f39f24d118104a79555171aedb904.zip
use after free
-rw-r--r--src/ats/ats_api_performance.c5
1 files changed, 4 insertions, 1 deletions
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,
346 GNUNET_free (rc); 346 GNUNET_free (rc);
347 return GNUNET_OK; 347 return GNUNET_OK;
348 } 348 }
349 GNUNET_free (rc);
350 /* amount non-zero, but client cancelled, consider undo! */ 349 /* amount non-zero, but client cancelled, consider undo! */
351 if (GNUNET_YES != rc->undo) 350 if (GNUNET_YES != rc->undo)
351 {
352 GNUNET_free (rc);
352 return GNUNET_OK; /* do not try to undo failed undos or negative amounts */ 353 return GNUNET_OK; /* do not try to undo failed undos or negative amounts */
354 }
355 GNUNET_free (rc);
353 (void) GNUNET_ATS_reserve_bandwidth (ph, &rr->peer, -amount, NULL, NULL); 356 (void) GNUNET_ATS_reserve_bandwidth (ph, &rr->peer, -amount, NULL, NULL);
354 return GNUNET_OK; 357 return GNUNET_OK;
355} 358}