From db4ba6e6909b4cf80b2b18f1a0d34b613de4be25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 4 Feb 2005 04:58:48 +0000 Subject: r5221: replace the str_list_*() code with new code based on talloc(). This is a precursor to adding the wins client code in the nbt server. (This used to be commit e8e499755ab667015740b35a7787134ebe852954) --- source4/libads/ldap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/libads/ldap.c') 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; -- cgit