- free memory on error, coverity #13058
authorBart Polot <bart@net.in.tum.de>
Fri, 5 Sep 2014 13:21:24 +0000 (13:21 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 5 Sep 2014 13:21:24 +0000 (13:21 +0000)
src/cadet/gnunet-service-cadet_connection.c

index 6d38090a294eb4519986204de07044b8ac0d40d1..a7a3b9121ec64c117f4af5c0e4bdd12373106b04 100644 (file)
@@ -1660,6 +1660,7 @@ GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer,
                                      size, &own_pos);
     if (NULL == path)
       return GNUNET_OK;
+
     if (0 == own_pos)
     {
       GNUNET_break_op (0);
@@ -1675,6 +1676,7 @@ GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer,
       {
         /* If we are destination, why did the creation fail? */
         GNUNET_break (0);
+        path_destroy (path);
         return GNUNET_OK;
       }
       send_broken_unknown (cid, &my_full_id,