-fix
authorChristian Grothoff <christian@grothoff.org>
Mon, 12 Mar 2012 12:56:54 +0000 (12:56 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 12 Mar 2012 12:56:54 +0000 (12:56 +0000)
src/peerinfo-tool/gnunet-peerinfo.c

index 3ca8b086200ce6e1b69919e47020693e4e0f6e03..03b628dcba391f616b74366e0d251cb158ca6475 100644 (file)
@@ -514,6 +514,8 @@ add_address_to_hello (void *cls, size_t max, void *buffer)
     ctx->ret = GNUNET_SYSERR;
     return 0;
   }
+  ctx->pos++;
+  memset (&expiration_time, 0, sizeof (expiration_time));
   tname = strptime (ctx->pos,
                    "%Y%m%d%H%M%S",
                    &expiration_time);
@@ -772,6 +774,7 @@ state_machine (void *cls,
       fprintf (stderr,
               _("Invalid URI `%s'\n"),
               put_uri);    
+    GNUNET_free (put_uri);
     put_uri = NULL;
     return;
   }