From efa3803335e85fab6cbd93c33353c7e3db624afa Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 21 May 2006 23:57:19 +0000 Subject: r15788: Do not crash when no result is returned (This used to be commit efb7e39e512eb71deaeef1315bc88a902e5cd848) --- source4/torture/ldap/cldap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/torture') diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c index 78bc6063a5..45d758547d 100644 --- a/source4/torture/ldap/cldap.c +++ b/source4/torture/ldap/cldap.c @@ -186,6 +186,10 @@ static void cldap_dump_results(struct cldap_search *search) struct ldb_ldif ldif; struct ldb_context *ldb; + if (!search || !(search->out.response)) { + return; + } + /* we need a ldb context to use ldb_ldif_write_file() */ ldb = ldb_init(NULL); -- cgit