diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-12-20 18:44:06 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-12-20 18:44:06 +0000 |
commit | d42a67d2107c205f65d7ab8f7b7aa436767ecf0a (patch) | |
tree | babcf97cdacec931b264cb165d952beb9c6ee728 /src/gns/gns_api.c | |
parent | 1fafb67104a747d2b8ad723bfed23cdcc6a08d3c (diff) | |
download | gnunet-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.c | 5 |
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 | ||