diff options
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |