From a79bc3ecfdd28ad12b9e5363a83b3ff5014872ac Mon Sep 17 00:00:00 2001 From: defanor Date: Fri, 5 May 2017 22:15:15 +0300 Subject: Compare opt.peer_cert_path to NULL, not 0 --- tlsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tlsd.c') diff --git a/tlsd.c b/tlsd.c index 5462741..db14bbf 100644 --- a/tlsd.c +++ b/tlsd.c @@ -798,7 +798,7 @@ int main (int argc, /* TODO: consider using chdir or open/openat instead */ opt.peer_cert_path = malloc(opt.peer_cert_dir_len + MAX_FINGERPRINT_NIBBLES + 1); - if (! opt.peer_cert_path) { + if (opt.peer_cert_path == NULL) { syslog(LOG_ERR, "Failed to allocate memory"); closelog(); return 1; @@ -810,7 +810,7 @@ int main (int argc, ret = serve(opt); /* Cleanup and exit */ - if (opt.peer_cert_path) + if (opt.peer_cert_path != NULL) free(opt.peer_cert_path); closelog(); return ret; -- cgit v1.2.3