gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 140/164: Fixed wrong place for null check


From: gnunet
Subject: [gnunet] 140/164: Fixed wrong place for null check
Date: Fri, 30 Jul 2021 15:33:26 +0200

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

grothoff pushed a commit to branch master
in repository gnunet.

commit 4ec38f4c408b37a30a36288435176d8a70174219
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Tue Jun 8 08:34:04 2021 +0200

    Fixed wrong place for null check
---
 src/setu/gnunet-service-setu.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 8a4c223f2..94b660a20 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -3819,6 +3819,13 @@ handle_union_p2p_demand (void *cls,
   {
     ee = GNUNET_CONTAINER_multihashmap_get (op->set->content->elements,
                                             hash);
+      if (NULL == ee)
+      {
+          /* Demand for non-existing element. */
+          GNUNET_break_op (0);
+          fail_union_operation (op);
+          return;
+      }
 
     /* Save send demand message for message control */
     if (GNUNET_YES !=
@@ -3852,14 +3859,6 @@ handle_union_p2p_demand (void *cls,
       fail_union_operation (op);
       return;
     }
-    ;
-    if (NULL == ee)
-    {
-      /* Demand for non-existing element. */
-      GNUNET_break_op (0);
-      fail_union_operation (op);
-      return;
-    }
     if (GNUNET_NO == _GSS_is_element_of_operation (ee, op))
     {
       /* Probably confused lazily copied sets. */

-- 
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]