mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix memory leak in options_act_reversible: fix Coverity CID 486,487
This commit is contained in:
+5
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user