summaryrefslogtreecommitdiff
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 cdc8b1f1..f5b1f95f 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -746,7 +746,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);
}