[Pkg-privacy-commits] [torsocks] 29/38: Fix wrong tor_address check for NULL

Intrigeri intrigeri at moszumanska.debian.org
Thu Jun 23 15:18:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental/master
in repository torsocks.

commit ec4987112695ab338e854c37458a3f811b9ce8f1
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Tue Jun 14 10:53:56 2016 -0400

    Fix wrong tor_address check for NULL
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/common/config-file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/config-file.c b/src/common/config-file.c
index 05ca9cb..a22d4c6 100644
--- a/src/common/config-file.c
+++ b/src/common/config-file.c
@@ -284,13 +284,13 @@ int conf_file_set_tor_address(const char *addr, struct configuration *config)
 		config->conf_file.tor_domain = CONNECTION_DOMAIN_INET6;
 	}
 
-	if (config->conf_file.tor_address == NULL) {
+	if (config->conf_file.tor_address != NULL) {
 		free(config->conf_file.tor_address);
 		config->conf_file.tor_address = NULL;
 	}
 
 	config->conf_file.tor_address = strdup(addr);
-	if (!config->conf_file.tor_address) {
+	if (config->conf_file.tor_address == NULL) {
 		ret = -ENOMEM;
 		goto error;
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torsocks.git



More information about the Pkg-privacy-commits mailing list