summaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-06-25 11:12:49 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-06-25 11:12:49 +0000
commitfae024d9cfaa6294d53c9cdedbb8c35b258b8539 (patch)
tree4a0ed0b43792f5f746d2b85babc7c2b7601c19f7 /src/transport/test_plugin_transport.c
parent5c53ec92bfc9bd9d3951f1c28d8c210537af4bf6 (diff)
fixing coverity 10464: Resource leak
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r--src/transport/test_plugin_transport.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 8dde5c10b..d2d03daa7 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -565,6 +565,9 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Hostkey `%s' missing. Exiting.\n",
HOSTKEY_FILE);
+ GNUNET_free (keyfile);
+ end_badly_now ();
+ return;
}
if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (keyfile))
@@ -572,6 +575,7 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Could not create a directory for hostkey `%s'. Exiting.\n",
keyfile);
+ GNUNET_free (keyfile);
end_badly_now ();
return;
}
@@ -581,6 +585,7 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Could not copy hostkey `%s' to destination `%s'. Exiting.\n",
HOSTKEY_FILE, keyfile);
+ GNUNET_free (keyfile);
end_badly_now ();
return;
}