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

[tor-commits] [tor/master] Fix memory leak in options_act_reversible: fix Coverity CID 486, 487



commit 097ed9998bc93b2dff1c6dcbff974ab4d8d17731
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Oct 6 12:54:34 2011 -0400

    Fix memory leak in options_act_reversible: fix Coverity CID 486,487
---
 src/or/config.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index 3080da0..c5322f5 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1077,8 +1077,11 @@ options_act_reversible(const or_options_t *old_options, char **msg)
     }
 
     /* Adjust the client port configuration so we can launch listeners. */
-    if (parse_client_ports(options, 0, msg, &n_client_ports))
-      return -1;
+    if (parse_client_ports(options, 0, msg, &n_client_ports)) {
+      if (!*msg)
+        *msg = tor_strdup("Unexpected problem parsing client port config");
+      goto rollback;
+    }
 
     /* Set the hibernation state appropriately.*/
     consider_hibernation(time(NULL));



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