diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-06 12:54:34 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-26 13:22:13 -0400 |
commit | 097ed9998bc93b2dff1c6dcbff974ab4d8d17731 (patch) | |
tree | 0875cc203b86b4170faaf5813cb4306c41dfd255 /src/or/config.c | |
parent | e0a053be01211133e68ec5e75d49aaddea5d4072 (diff) | |
download | tor-097ed9998bc93b2dff1c6dcbff974ab4d8d17731.tar tor-097ed9998bc93b2dff1c6dcbff974ab4d8d17731.tar.gz |
Fix memory leak in options_act_reversible: fix Coverity CID 486,487
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | 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 3080da048..c5322f512 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)); |