summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldapd/index.c
diff options
context:
space:
mode:
authormartinh <martinh@openbsd.org>2010-06-03 17:32:25 +0000
committermartinh <martinh@openbsd.org>2010-06-03 17:32:25 +0000
commita33d639a900bce27214d00ea61bfc54715ea774b (patch)
tree6855bbb4ceb666e13bfbe478904c2f2281860313 /usr.sbin/ldapd/index.c
parentOpen database files before chrooting, and use an absolute path to (diff)
downloadwireguard-openbsd-a33d639a900bce27214d00ea61bfc54715ea774b.tar.xz
wireguard-openbsd-a33d639a900bce27214d00ea61bfc54715ea774b.zip
Fix compilation on gcc2. Check a return value from malloc while at it.
"that compiles!" deraadt@
Diffstat (limited to 'usr.sbin/ldapd/index.c')
-rw-r--r--usr.sbin/ldapd/index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/index.c b/usr.sbin/ldapd/index.c
index 9db1d2feb40..11fd2f53135 100644
--- a/usr.sbin/ldapd/index.c
+++ b/usr.sbin/ldapd/index.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: index.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
+/* $OpenBSD: index.c,v 1.3 2010/06/03 17:32:25 martinh Exp $ */
/*
* Copyright (c) 2009 Martin Hedenfalk <martin@bzero.se>
@@ -375,7 +375,7 @@ continue_indexer(int fd, short why, void *arg)
struct ber_element *elm;
struct btval key, val;
struct timeval tv;
- int i, rc;
+ int i, rc = BT_FAIL;
if (c->cursor == NULL) {
log_info("begin indexing namespace %s", c->ns->suffix);