gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: -fix recursive use-after-free c


From: gnunet
Subject: [taler-anastasis] branch master updated: -fix recursive use-after-free case
Date: Thu, 28 Apr 2022 16:05:40 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new aecfe69  -fix recursive use-after-free case
aecfe69 is described below

commit aecfe6973db3cf5c9ff2be0aa164eabfa50a60bb
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Apr 28 16:05:37 2022 +0200

    -fix recursive use-after-free case
---
 src/reducer/anastasis_api_redux.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/reducer/anastasis_api_redux.c 
b/src/reducer/anastasis_api_redux.c
index 2271942..1c770f1 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -545,7 +545,22 @@ notify_waiting (struct ConfigRequest *cr)
            w->state);
     abort_provider_config_cb (w);
   }
+}
+
+
+/**
+ * Notify anyone waiting on @a cr that the request is done
+ * (successful or failed).
+ *
+ * @param[in,out] cls request that completed
+ */
+static void
+notify_waiting_cb (void *cls)
+{
+  struct ConfigRequest *cr = cls;
 
+  cr->tt = NULL;
+  notify_waiting (cr);
 }
 
 
@@ -1157,8 +1172,10 @@ ANASTASIS_REDUX_add_provider_to_state_ (const char *url,
                                w);
   if (NULL == cr->co)
   {
-    notify_waiting (cr);
-    return NULL;
+    if (NULL != cr->tt)
+      GNUNET_SCHEDULER_cancel (cr->tt);
+    cr->tt = GNUNET_SCHEDULER_add_now (&notify_waiting_cb,
+                                       cr);
   }
   return &w->ra;
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]