gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37884 - gnunet/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r37884 - gnunet/src/namestore
Date: Mon, 5 Sep 2016 03:59:35 +0200

Author: amatus
Date: 2016-09-05 03:59:35 +0200 (Mon, 05 Sep 2016)
New Revision: 37884

Modified:
   gnunet/src/namestore/gnunet-service-namestore.c
Log:
Fix UAF detected by asan


Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c     2016-09-05 01:50:41 UTC 
(rev 37883)
+++ gnunet/src/namestore/gnunet-service-namestore.c     2016-09-05 01:59:35 UTC 
(rev 37884)
@@ -340,13 +340,6 @@
              client);
   if (NULL == (nc = GNUNET_SERVER_client_get_user_context (client, struct 
NamestoreClient)))
     return;
-  while (NULL != (no = nc->op_head))
-  {
-    GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no);
-    GNUNET_free (no);
-  }
-  GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc);
-  GNUNET_free (nc);
   for (zm = monitor_head; NULL != zm; zm = zm->next)
   {
     if (client == zm->nc->client)
@@ -363,6 +356,13 @@
       break;
     }
   }
+  while (NULL != (no = nc->op_head))
+  {
+    GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no);
+    GNUNET_free (no);
+  }
+  GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc);
+  GNUNET_free (nc);
   for (cop = cop_head; NULL != cop; cop = cop->next)
     if (client == cop->client)
       cop->client = NULL;




reply via email to

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