-fix double free
authorChristian Grothoff <christian@grothoff.org>
Thu, 10 May 2012 13:11:43 +0000 (13:11 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 10 May 2012 13:11:43 +0000 (13:11 +0000)
src/testing/testing.c

index c9080f44468fe419858db6e85ed9c84c96a6ae97..31bea068cfe84836f6d643a87237cf0cf3ab2fba 100644 (file)
@@ -504,9 +504,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         }
         GNUNET_free_non_null (d->hostname);
         GNUNET_free_non_null (d->username);
-        GNUNET_free_non_null (d->username);
         GNUNET_OS_process_destroy (d->proc_arm_start);
        d->proc_arm_start = NULL;
+       d->username = NULL;
         d->hostname = NULL;     // Quick hack to avoid crashing (testing need to be
         d->cfg = NULL;          // overhauled anyway, and the error managing is
        // GNUNET_free (d); // FIXME (could this leak)