diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-28 16:01:51 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-28 16:01:51 +0000 |
commit | 8f8e6a5bb1ccbb7d1311332ec1cc3a340bdd621f (patch) | |
tree | fe7b589202e626a013b48050bd087a330efa1f1b /src/testbed/testbed_api.c | |
parent | 4a77d5e8ecf53f7fb2f54545d7c4313b3bcd7c05 (diff) | |
download | gnunet-8f8e6a5bb1ccbb7d1311332ec1cc3a340bdd621f.tar.gz gnunet-8f8e6a5bb1ccbb7d1311332ec1cc3a340bdd621f.zip |
- fix crashes in testbed_api_testbed upon interrupts
Diffstat (limited to 'src/testbed/testbed_api.c')
-rw-r--r-- | src/testbed/testbed_api.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 25ed1ab41..e85fbb8f1 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -2073,10 +2073,16 @@ oprelease_shutdown_peers (void *cls) | |||
2073 | { | 2073 | { |
2074 | struct OperationContext *opc = cls; | 2074 | struct OperationContext *opc = cls; |
2075 | 2075 | ||
2076 | if (OPC_STATE_FINISHED != opc->state) | 2076 | switch (opc->state) |
2077 | { | 2077 | { |
2078 | GNUNET_free (opc->data); | 2078 | case OPC_STATE_STARTED: |
2079 | GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc); | 2079 | GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc); |
2080 | /* no break; continue */ | ||
2081 | case OPC_STATE_INIT: | ||
2082 | GNUNET_free (opc->data); | ||
2083 | break; | ||
2084 | case OPC_STATE_FINISHED: | ||
2085 | break; | ||
2080 | } | 2086 | } |
2081 | GNUNET_free (opc); | 2087 | GNUNET_free (opc); |
2082 | } | 2088 | } |