diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2014-12-20 17:02:44 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2014-12-20 17:02:44 +0000 |
commit | 806b3103565a80b2080efee722f702d7870ad5c7 (patch) | |
tree | 9aeb3a7548917a86c084a988dfb055ca2612f394 /src | |
parent | 7f57da285eb93330722ec6b6176c9187d355d03f (diff) | |
download | gnunet-806b3103565a80b2080efee722f702d7870ad5c7.tar.gz gnunet-806b3103565a80b2080efee722f702d7870ad5c7.zip |
Remove superflous heap allocation
Diffstat (limited to 'src')
-rw-r--r-- | src/peerstore/gnunet-service-peerstore.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c index 3f54eed85..8af151400 100644 --- a/src/peerstore/gnunet-service-peerstore.c +++ b/src/peerstore/gnunet-service-peerstore.c | |||
@@ -250,15 +250,12 @@ record_iterator (void *cls, const struct GNUNET_PEERSTORE_Record *record, | |||
250 | if (NULL == record) | 250 | if (NULL == record) |
251 | { | 251 | { |
252 | /* No more records */ | 252 | /* No more records */ |
253 | struct GNUNET_MessageHeader *endmsg; | 253 | struct GNUNET_MessageHeader endmsg; |
254 | 254 | ||
255 | endmsg = GNUNET_new (struct GNUNET_MessageHeader); | 255 | endmsg.size = htons (sizeof (struct GNUNET_MessageHeader)); |
256 | 256 | endmsg.type = htons (GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END); | |
257 | endmsg->size = htons (sizeof (struct GNUNET_MessageHeader)); | 257 | GNUNET_SERVER_notification_context_unicast (nc, cls_record->client, &endmsg, |
258 | endmsg->type = htons (GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END); | ||
259 | GNUNET_SERVER_notification_context_unicast (nc, cls_record->client, endmsg, | ||
260 | GNUNET_NO); | 258 | GNUNET_NO); |
261 | GNUNET_free (endmsg); | ||
262 | GNUNET_SERVER_receive_done (cls_record->client, | 259 | GNUNET_SERVER_receive_done (cls_record->client, |
263 | NULL == emsg ? GNUNET_OK : GNUNET_SYSERR); | 260 | NULL == emsg ? GNUNET_OK : GNUNET_SYSERR); |
264 | PEERSTORE_destroy_record (cls_record); | 261 | PEERSTORE_destroy_record (cls_record); |