From 19df9091358092adf2f6df48783a4f91bc573a5f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Oct 2006 19:03:29 +0000 Subject: r19068: Fix a potential NULL dereference (This used to be commit 2dff8ee8cc8b9faf3fbec46d458d6de214622afc) --- source4/lib/ldb/common/ldb_dn.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index a0f48723ab..204dd3b462 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -345,6 +345,10 @@ struct ldb_dn *ldb_dn_explode(void *mem_ctx, const char *dn) /* Allocate a structure to hold the exploded DN */ edn = ldb_dn_new(mem_ctx); + if (edn == NULL) { + return NULL; + } + pdn = NULL; /* Empty DNs */ -- cgit