summaryrefslogtreecommitdiffstats
path: root/source/lib/ldap_escape.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/ldap_escape.c')
-rw-r--r--source/lib/ldap_escape.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/lib/ldap_escape.c b/source/lib/ldap_escape.c
index 3feb0e0c44e..fcb787e9e85 100644
--- a/source/lib/ldap_escape.c
+++ b/source/lib/ldap_escape.c
@@ -40,6 +40,10 @@ char *escape_ldap_string_alloc(const char *s)
const char *sub;
int i = 0;
char *p = output;
+
+ if (output == NULL) {
+ return NULL;
+ }
while (*s)
{