diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-05 22:03:49 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-05 22:03:49 +0000 |
commit | 62429679c3b5b45fd1e25d19957ef2e6193b6227 (patch) | |
tree | 5f08b4a4f0c2dc3e219b5db6118f07dfa0073120 /src/testbed/gnunet-service-testbed_peers.c | |
parent | 5a32c5a448d513f1dd1bbc5f5b0d06a3212b2315 (diff) | |
download | gnunet-62429679c3b5b45fd1e25d19957ef2e6193b6227.tar.gz gnunet-62429679c3b5b45fd1e25d19957ef2e6193b6227.zip |
-fix leak, use 'op'
Diffstat (limited to 'src/testbed/gnunet-service-testbed_peers.c')
-rw-r--r-- | src/testbed/gnunet-service-testbed_peers.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c index 998ab81c6..88c8c8231 100644 --- a/src/testbed/gnunet-service-testbed_peers.c +++ b/src/testbed/gnunet-service-testbed_peers.c | |||
@@ -361,7 +361,7 @@ GST_handle_peer_create (void *cls, struct GNUNET_SERVER_Client *client, | |||
361 | } | 361 | } |
362 | GNUNET_CONFIGURATION_set_value_number (cfg, "TESTBED", "PEERID", | 362 | GNUNET_CONFIGURATION_set_value_number (cfg, "TESTBED", "PEERID", |
363 | (unsigned long long) peer_id); | 363 | (unsigned long long) peer_id); |
364 | 364 | ||
365 | GNUNET_CONFIGURATION_set_value_number (cfg, "PATHS", "PEERID", | 365 | GNUNET_CONFIGURATION_set_value_number (cfg, "PATHS", "PEERID", |
366 | (unsigned long long) peer_id); | 366 | (unsigned long long) peer_id); |
367 | peer = GNUNET_malloc (sizeof (struct Peer)); | 367 | peer = GNUNET_malloc (sizeof (struct Peer)); |
@@ -798,7 +798,7 @@ update_peer_config (struct Peer *peer, | |||
798 | GNUNET_TESTING_peer_destroy (peer->details.local.peer); | 798 | GNUNET_TESTING_peer_destroy (peer->details.local.peer); |
799 | GNUNET_CONFIGURATION_destroy (peer->details.local.cfg); | 799 | GNUNET_CONFIGURATION_destroy (peer->details.local.cfg); |
800 | peer->details.local.cfg = cfg; | 800 | peer->details.local.cfg = cfg; |
801 | emsg = NULL; | 801 | emsg = NULL; |
802 | peer->details.local.peer | 802 | peer->details.local.peer |
803 | = GNUNET_TESTING_peer_configure (GST_context->system, | 803 | = GNUNET_TESTING_peer_configure (GST_context->system, |
804 | peer->details.local.cfg, peer->id, | 804 | peer->details.local.cfg, peer->id, |
@@ -943,17 +943,18 @@ GST_handle_peer_reconfigure (void *cls, struct GNUNET_SERVER_Client *client, | |||
943 | return; | 943 | return; |
944 | } | 944 | } |
945 | prc = GNUNET_malloc (sizeof (struct PeerReconfigureContext)); | 945 | prc = GNUNET_malloc (sizeof (struct PeerReconfigureContext)); |
946 | if (GNUNET_OK != | 946 | if (GNUNET_OK != |
947 | GNUNET_TESTING_peer_stop_async (peer->details.local.peer, &prc_stop_cb, | 947 | GNUNET_TESTING_peer_stop_async (peer->details.local.peer, &prc_stop_cb, |
948 | prc)) | 948 | prc)) |
949 | { | 949 | { |
950 | GNUNET_assert (0 < GNUNET_asprintf (&emsg, | 950 | GNUNET_assert (0 < GNUNET_asprintf (&emsg, |
951 | "Error trying to stop peer %u asynchronously\n", | 951 | "Error trying to stop peer %u asynchronously\n", |
952 | peer_id)); | 952 | peer_id)); |
953 | LOG (GNUNET_ERROR_TYPE_ERROR, "%s\n", emsg); | 953 | LOG (GNUNET_ERROR_TYPE_ERROR, "%s\n", emsg); |
954 | GST_send_operation_fail_msg (client, op_id, emsg); | 954 | GST_send_operation_fail_msg (client, op_id, emsg); |
955 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 955 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
956 | GNUNET_free (prc); | 956 | GNUNET_free (prc); |
957 | GNUNET_free (emsg); | ||
957 | return; | 958 | return; |
958 | } | 959 | } |
959 | prc->cfg = cfg; | 960 | prc->cfg = cfg; |