[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Add a tor_free() in tor_gencert to fix a coverity warning



commit 8a0b7414870d2e0ddf90db8184b36be7309bd5c1
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Oct 16 17:18:46 2018 -0400

    Add a tor_free() in tor_gencert to fix a coverity warning
---
 src/tools/tor-gencert.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c
index a498c205b..238564125 100644
--- a/src/tools/tor-gencert.c
+++ b/src/tools/tor-gencert.c
@@ -190,6 +190,7 @@ parse_commandline(int argc, char **argv)
         fprintf(stderr, "%s must resolve to an IPv4 address", addr_arg);
         return 1;
       }
+      tor_free(address);
       address = tor_strdup(fmt_addrport(&addr, port));
     } else if (!strcmp(argv[i], "--create-identity-key")) {
       make_new_id = 1;

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits