summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-17 16:35:55 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-18 10:03:19 +0200
commitc9ef9da12fed2c3ea1d46dc710393f6ffebe7491 (patch)
treebb0c8742d1de40597ab1985a6f79544eb8a32610 /source4/ldap_server
parente7fef1ac84c39647306f8bb075f97e36549a8289 (diff)
downloadsamba-c9ef9da12fed2c3ea1d46dc710393f6ffebe7491.tar.gz
samba-c9ef9da12fed2c3ea1d46dc710393f6ffebe7491.tar.bz2
samba-c9ef9da12fed2c3ea1d46dc710393f6ffebe7491.zip
s4:ldap_backend.c - fix crash bugs when we got in error situations with "res" still set to "NULL"
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_backend.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index 70f457249c..364fe54e0b 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -746,8 +746,7 @@ reply:
modify_result = &modify_reply->msg->r.ModifyResponse;
modify_result->dn = NULL;
-
- if (res->refs != NULL) {
+ if ((res != NULL) && (res->refs != NULL)) {
modify_result->resultcode = map_ldb_error(local_ctx,
LDB_ERR_REFERRAL,
NULL, &errstr);
@@ -837,7 +836,7 @@ reply:
add_result = &add_reply->msg->r.AddResponse;
add_result->dn = NULL;
- if (res->refs != NULL) {
+ if ((res != NULL) && (res->refs != NULL)) {
add_result->resultcode = map_ldb_error(local_ctx,
LDB_ERR_REFERRAL, NULL,
&errstr);
@@ -893,7 +892,7 @@ reply:
del_result = &del_reply->msg->r.DelResponse;
del_result->dn = NULL;
- if (res->refs != NULL) {
+ if ((res != NULL) && (res->refs != NULL)) {
del_result->resultcode = map_ldb_error(local_ctx,
LDB_ERR_REFERRAL, NULL,
&errstr);
@@ -998,7 +997,7 @@ reply:
modifydn = &modifydn_r->msg->r.ModifyDNResponse;
modifydn->dn = NULL;
- if (res->refs != NULL) {
+ if ((res != NULL) && (res->refs != NULL)) {
modifydn->resultcode = map_ldb_error(local_ctx,
LDB_ERR_REFERRAL, NULL,
&errstr);;