summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/sdap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index be80e51c3..c2dccb11d 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -709,7 +709,7 @@ static char *get_naming_context(TALLOC_CTX *mem_ctx,
* a zero-length namingContexts value in some situations. In this
* case, we should return it as NULL so things fail gracefully.
*/
- if (naming_context[0] == '\0') {
+ if (naming_context && naming_context[0] == '\0') {
talloc_zfree(naming_context);
}