aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gns_api.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-12-20 18:44:06 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-12-20 18:44:06 +0000
commitd42a67d2107c205f65d7ab8f7b7aa436767ecf0a (patch)
treebabcf97cdacec931b264cb165d952beb9c6ee728 /src/gns/gns_api.c
parent1fafb67104a747d2b8ad723bfed23cdcc6a08d3c (diff)
downloadgnunet-d42a67d2107c205f65d7ab8f7b7aa436767ecf0a.tar.gz
gnunet-d42a67d2107c205f65d7ab8f7b7aa436767ecf0a.zip
- fix use after free cases
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r--src/gns/gns_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index b75755e25..b2f54746f 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -422,6 +422,9 @@ process_message (void *cls, const struct GNUNET_MessageHeader *msg)
422 force_reconnect (handle); 422 force_reconnect (handle);
423 return; 423 return;
424 } 424 }
425
426 GNUNET_CLIENT_receive (handle->client, &process_message, handle,
427 GNUNET_TIME_UNIT_FOREVER_REL);
425 switch (ntohs (msg->type)) 428 switch (ntohs (msg->type))
426 { 429 {
427 case GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT: 430 case GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT:
@@ -447,8 +450,6 @@ process_message (void *cls, const struct GNUNET_MessageHeader *msg)
447 force_reconnect (handle); 450 force_reconnect (handle);
448 return; 451 return;
449 } 452 }
450 GNUNET_CLIENT_receive (handle->client, &process_message, handle,
451 GNUNET_TIME_UNIT_FOREVER_REL);
452} 453}
453 454
454 455