GNUNET_free (d->cfgfile);
GNUNET_free_non_null (d->hostname);
GNUNET_free_non_null (d->username);
+ GNUNET_free_non_null (d->shortname);
GNUNET_free (d);
if (NULL != cb)
cb (cb_cls, NULL);
ctx->d2th = NULL;
GNUNET_CORE_disconnect (ctx->d1core);
ctx->d1core = NULL;
-
+ GNUNET_free_non_null (ctx->hello);
GNUNET_free (ctx);
}
unsigned int off;
unsigned int hostcnt;
uint16_t minport;
- int tempsize;
if (0 == total)
{
GNUNET_CONFIGURATION_get_value_string (pcfg, "PATHS", "SERVICEHOME",
&baseservicehome))
{
- tempsize = snprintf (NULL, 0, "%s/%d/", baseservicehome, off) + 1;
- newservicehome = GNUNET_malloc (tempsize);
- snprintf (newservicehome, tempsize, "%s/%d/", baseservicehome, off);
+ GNUNET_asprintf (&newservicehome,
+ "%s/%d/", baseservicehome, off);
+ GNUNET_free (baseservicehome);
}
else
{
tmpdir = getenv ("TMPDIR");
tmpdir = tmpdir ? tmpdir : "/tmp";
- tempsize = snprintf (NULL, 0, "%s/%s/%d/", tmpdir, "gnunet-testing-test-test", off) + 1;
- newservicehome = GNUNET_malloc (tempsize);
- snprintf (newservicehome, tempsize, "%s/%d/",
- "/tmp/gnunet-testing-test-test", off);
+ GNUNET_asprintf (&newservicehome,
+ "%s/%s/%d/",
+ tmpdir,
+ "gnunet-testing-test-test", off);
}
GNUNET_CONFIGURATION_set_value_string (pcfg,
"PATHS",