summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dht/dht_api.c3
-rw-r--r--src/dht/gnunet-service-dht_clients.c12
-rw-r--r--src/dht/gnunet-service-dht_hello.c3
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c3
4 files changed, 7 insertions, 14 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index 19aa58a35..96399cb5a 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -1258,8 +1258,7 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *mh)
}
GNUNET_MQ_send (handle->mq,
env);
- if (NULL != mh->key)
- GNUNET_free (mh->key);
+ GNUNET_free (mh->key);
GNUNET_free (mh);
}
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index 86b7653da..cfcb25336 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -938,8 +938,7 @@ handle_dht_local_monitor_stop (void *cls,
GNUNET_CONTAINER_DLL_remove (monitor_head,
monitor_tail,
r);
- if (NULL != r->key)
- GNUNET_free (r->key);
+ GNUNET_free (r->key);
GNUNET_free (r);
return; /* Delete only ONE entry */
}
@@ -1282,8 +1281,7 @@ GDS_CLIENTS_process_get (uint32_t options,
env);
}
}
- if (NULL != cl)
- GNUNET_free (cl);
+ GNUNET_free (cl);
}
@@ -1365,8 +1363,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
env);
}
}
- if (NULL != cl)
- GNUNET_free (cl);
+ GNUNET_free (cl);
}
@@ -1448,8 +1445,7 @@ GDS_CLIENTS_process_put (uint32_t options,
env);
}
}
- if (NULL != cl)
- GNUNET_free (cl);
+ GNUNET_free (cl);
}
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c
index 7b22e928f..906391334 100644
--- a/src/dht/gnunet-service-dht_hello.c
+++ b/src/dht/gnunet-service-dht_hello.c
@@ -86,8 +86,7 @@ process_hello (void *cls,
gettext_noop ("# HELLOs obtained from peerinfo"), 1,
GNUNET_NO);
hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer);
- if (NULL != hm)
- GNUNET_free (hm);
+ GNUNET_free (hm);
hm = GNUNET_malloc (GNUNET_HELLO_size (hello));
GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello));
GNUNET_assert (GNUNET_SYSERR !=
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 39b155152..88b0c5d92 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1436,8 +1436,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
if (msize + sizeof(struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE)
{
GNUNET_break (0);
- if (NULL != reply_bf)
- GNUNET_free (reply_bf);
+ GNUNET_free (reply_bf);
GNUNET_free (targets);
return GNUNET_NO;
}