From: Julius Bünger Date: Wed, 14 Sep 2016 22:38:07 +0000 (+0000) Subject: -rps _peers: prevent leaking of storage X-Git-Tag: initial-import-from-subversion-38251~274 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5b9b515c322df524362bca34d2717374b968c81e;p=oweals%2Fgnunet.git -rps _peers: prevent leaking of storage --- diff --git a/src/rps/gnunet-service-rps_peers.c b/src/rps/gnunet-service-rps_peers.c index 49b154547..1a42a3acc 100644 --- a/src/rps/gnunet-service-rps_peers.c +++ b/src/rps/gnunet-service-rps_peers.c @@ -874,7 +874,7 @@ restore_valid_peers () char *buf; ssize_t size_read; char *iter_buf; - const char *str_repr; + char *str_repr; const struct GNUNET_PeerIdentity *peer; if (0 == strncmp ("DISABLE", filename_valid_peers, 7)) @@ -903,6 +903,7 @@ restore_valid_peers () { str_repr = GNUNET_strndup (iter_buf, 53); peer = s2i_full (str_repr); + GNUNET_free (str_repr); add_valid_peer (peer); LOG (GNUNET_ERROR_TYPE_DEBUG, "Restored valid peer %s from disk\n",