diff options
Diffstat (limited to 'source4/libads')
-rw-r--r-- | source4/libads/ldap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/libads/ldap.c b/source4/libads/ldap.c index d63d667777..f760843b59 100644 --- a/source4/libads/ldap.c +++ b/source4/libads/ldap.c @@ -391,7 +391,8 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, else { /* This would be the utf8-encoded version...*/ /* if (!(search_attrs = ads_push_strvals(ctx, attrs))) */ - if (!(str_list_copy(&search_attrs, attrs))) { + search_attrs = str_list_copy(ctx, attrs); + if (search_attrs == NULL) { rc = LDAP_NO_MEMORY; goto done; } @@ -616,8 +617,8 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, else { /* This would be the utf8-encoded version...*/ /* if (!(search_attrs = ads_push_strvals(ctx, attrs))) */ - if (!(str_list_copy(&search_attrs, attrs))) - { + search_attrs = str_list_copy(ctx, attrs); + if (search_attrs == NULL) { DEBUG(1,("ads_do_search: str_list_copy() failed!")); rc = LDAP_NO_MEMORY; goto done; |