From 8961048d2450e01fd44d33d2c514775b071064e0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Jun 2006 09:45:18 +0000 Subject: r16339: Fix Klocwork ID 277 278 (cmd_*) 485 487 488 (ldap.c) Volker (This used to be commit 5b1eba76b3ec5cb9b896a9a5641b4d83bdbdd4cf) --- source3/libads/ldap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/libads/ldap.c') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 13459ba40d..397d8c02f0 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -904,7 +904,13 @@ char *ads_get_dn_canonical(ADS_STRUCT *ads, void *msg) **/ char *ads_parent_dn(const char *dn) { - char *p = strchr(dn, ','); + char *p; + + if (dn == NULL) { + return NULL; + } + + p = strchr(dn, ','); if (p == NULL) { return NULL; -- cgit