fixing use-after-free
authorChristian Grothoff <christian@grothoff.org>
Thu, 23 Dec 2010 15:35:59 +0000 (15:35 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 23 Dec 2010 15:35:59 +0000 (15:35 +0000)
src/core/core_api.c

index c3d7fd79859759f6a87a978c04c0588e6cf4f0ef..1ececcb6413e7c768eaa1165807012b87e39af27 100644 (file)
@@ -544,6 +544,8 @@ request_next_transmission (struct PeerRecord *pr)
       trigger_next_request (h, GNUNET_NO);
       return;
     }
+  if (th->cm != NULL)
+    return; /* already done */
   GNUNET_assert (pr->prev == NULL);
   GNUNET_assert (pr->next == NULL);
   pr->timeout_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining (th->timeout),