summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-10-12 11:57:41 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-10-12 11:57:41 +0000
commit4557e0d8a16da274ab74684f9f41d28bfca45095 (patch)
tree6f624f148d22f01a1c4abc4f501cd0cbcbb3e4be /usr.sbin
parent5ae222001e2c73c803c816bc55d9683faede12ab (diff)
avoid use after free in error paths
ok miod@ martijn@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldapd/schema.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ldapd/schema.c b/usr.sbin/ldapd/schema.c
index 263596095cf..9d5ec991e14 100644
--- a/usr.sbin/ldapd/schema.c
+++ b/usr.sbin/ldapd/schema.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schema.c,v 1.19 2019/10/24 12:39:26 tb Exp $ */
+/* $OpenBSD: schema.c,v 1.20 2022/10/12 11:57:40 jsg Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martinh@openbsd.org>
@@ -834,6 +834,7 @@ schema_parse_attributetype(struct schema *schema)
goto fail;
}
free(kw);
+ kw = NULL;
}
/* Check that a syntax is defined, either directly or
@@ -972,6 +973,7 @@ schema_parse_objectclass(struct schema *schema)
goto fail;
}
free(kw);
+ kw = NULL;
}
/* Verify the subclassing is allowed.