diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-11-17 12:24:29 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-11-17 12:24:29 +0000 |
commit | ab1455c0d09ddaf5fbcf7ca69e47fb21e030ecfd (patch) | |
tree | 81a59ecb540e234a342e60040017a970b3b6f087 /src | |
parent | b304cd75b7d0e9afdc5cba6aae184bb0fb2ec5bd (diff) | |
download | gnunet-ab1455c0d09ddaf5fbcf7ca69e47fb21e030ecfd.tar.gz gnunet-ab1455c0d09ddaf5fbcf7ca69e47fb21e030ecfd.zip |
fix memleak
Diffstat (limited to 'src')
-rw-r--r-- | src/testing/testing.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index 7151cbd09..d707cd597 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -937,7 +937,6 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, | |||
937 | } | 937 | } |
938 | peer = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Peer)); | 938 | peer = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Peer)); |
939 | peer->cfgfile = config_filename; /* Free in peer_destroy */ | 939 | peer->cfgfile = config_filename; /* Free in peer_destroy */ |
940 | |||
941 | libexec_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 940 | libexec_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
942 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string(cfg, "arm", "PREFIX", &peer->main_binary)) | 941 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string(cfg, "arm", "PREFIX", &peer->main_binary)) |
943 | { | 942 | { |
@@ -947,10 +946,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, | |||
947 | } | 946 | } |
948 | else | 947 | else |
949 | peer->args = strdup (libexec_binary); | 948 | peer->args = strdup (libexec_binary); |
950 | |||
951 | peer->system = system; | 949 | peer->system = system; |
952 | peer->key_number = key_number; | 950 | peer->key_number = key_number; |
953 | |||
954 | GNUNET_free (libexec_binary); | 951 | GNUNET_free (libexec_binary); |
955 | return peer; | 952 | return peer; |
956 | } | 953 | } |
@@ -1216,7 +1213,7 @@ GNUNET_TESTING_service_run (const char *testdir, | |||
1216 | return 1; | 1213 | return 1; |
1217 | } | 1214 | } |
1218 | GNUNET_free (peer->main_binary); | 1215 | GNUNET_free (peer->main_binary); |
1219 | 1216 | GNUNET_free (peer->args); | |
1220 | GNUNET_asprintf (&binary, "gnunet-service-%s", service_name); | 1217 | GNUNET_asprintf (&binary, "gnunet-service-%s", service_name); |
1221 | libexec_binary = GNUNET_OS_get_libexec_binary_path (binary); | 1218 | libexec_binary = GNUNET_OS_get_libexec_binary_path (binary); |
1222 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string(cfg, service_name, "PREFIX", &peer->main_binary)) | 1219 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string(cfg, service_name, "PREFIX", &peer->main_binary)) |