summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-05-05 22:15:15 +0300
committerdefanor <defanor@uberspace.net>2017-05-05 22:15:15 +0300
commita79bc3ecfdd28ad12b9e5363a83b3ff5014872ac (patch)
tree63dc21850abe3fe7d52f01d95d0f352b829a54fc
parent46e91feda0374338e688902a7e7cd0e49f4138c9 (diff)
Compare opt.peer_cert_path to NULL, not 0
-rw-r--r--configure.ac2
-rw-r--r--tlsd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9306649..23544c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT(TLSd, 0.0.5, defanor@uberspace.net, tlsd,
+AC_INIT(TLSd, 0.0.6, defanor@uberspace.net, tlsd,
https://defanor.uberspace.net/projects/tlsd/)
AM_INIT_AUTOMAKE([-Wall])
AC_CONFIG_SRCDIR([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;