evstr = getenv (GNUNET_TESTING_PREFIX);
if (NULL != evstr)
{
-#ifdef WINDOWS
/* unsetting the variable will invalidate the pointer! */
evstr = GNUNET_strdup (evstr);
+#ifdef WINDOWS
GNUNET_break (0 != SetEnvironmentVariable (GNUNET_TESTING_PREFIX, NULL));
#else
GNUNET_break (0 == unsetenv (GNUNET_TESTING_PREFIX));
{
#ifdef WINDOWS
GNUNET_assert (0 != SetEnvironmentVariable (GNUNET_TESTING_PREFIX, evstr));
- GNUNET_free (evstr);
#else
static char evar[2* PATH_MAX];
GNUNET_TESTING_PREFIX "=%s", evstr));
putenv (evar);
#endif
- /* do not free evstr */
+ GNUNET_free (evstr);
evstr = NULL;
}
GNUNET_free_non_null (hostname);
xconfig_size =
GNUNET_TESTBED_compress_config_ (config, config_size, &xconfig);
GNUNET_free (config);
- wc = GNUNET_malloc (sizeof (struct WriteContext));
+ wc = GNUNET_new (struct WriteContext);
wc->length = xconfig_size + sizeof (struct GNUNET_TESTBED_HelperReply);
reply = GNUNET_realloc (xconfig, wc->length);
memmove (&reply[1], reply, xconfig_size);