fixing 1753
authorChristian Grothoff <christian@grothoff.org>
Wed, 14 Sep 2011 07:24:03 +0000 (07:24 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 14 Sep 2011 07:24:03 +0000 (07:24 +0000)
src/util/getopt_helpers.c
src/util/program.c

index d050ec99c18667032aa4b37646cfe56b4cc461e8..f00c27f29e246412af3a99a173b67a73ed3e2233 100644 (file)
@@ -223,8 +223,7 @@ GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   char **val = scls;
 
   GNUNET_assert (value != NULL);
-  if (NULL != *val)
-    GNUNET_free (*val);
+  GNUNET_free_non_null (*val);
   *val = GNUNET_strdup (value);
   return GNUNET_OK;
 }
index f1e95477da7e446b76a350969bea79829f4675fa..8b5279f286c223de5000ecadedcb248f44e32fb3 100644 (file)
@@ -224,6 +224,7 @@ GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
     GNUNET_CONFIGURATION_destroy (cfg);
     GNUNET_free_non_null (cc.cfgfile);
     GNUNET_free (loglev);
+    GNUNET_free (logfile);
     GNUNET_free (allopts);
     GNUNET_free (lpfx);
     return GNUNET_SYSERR;
@@ -248,6 +249,7 @@ GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
   GNUNET_CONFIGURATION_destroy (cfg);
   GNUNET_free_non_null (cc.cfgfile);
   GNUNET_free (loglev);
+  GNUNET_free (logfile);
   return GNUNET_OK;
 }