Commit c410ce63 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Set res parameter to NULL upon ldap_search_ext_s entry. Likewise for friends.

Note in manual that res parameter should be freed regardless of return value
of ldap_search_ext_s (or friends).
parent da0cdee8
......@@ -114,6 +114,14 @@ emulate read) or LDAP_SCOPE_ONELEVEL (to emulate list).
These routines may dynamically allocate memory. The caller is
responsible for freeing such memory using supplied deallocation
routines. Return values are contained in <ldap.h>.
.LP
Note that \fIres\fR parameter of
.B ldap_search_ext_s()
and
.B ldap_search_s()
should be freed with
.B ldap_msgfree()
regardless of return value of these functions.
.SH DEPRECATED INTERFACES
The
.B ldap_search()
......
......@@ -169,6 +169,8 @@ ldap_pvt_search_s(
int rc;
int msgid;
*res = NULL;
rc = ldap_pvt_search( ld, base, scope, filter, attrs, attrsonly,
sctrls, cctrls, timeout, sizelimit, deref, &msgid );
......@@ -393,6 +395,8 @@ ldap_search_st(
{
int msgid;
*res = NULL;
if ( (msgid = ldap_search( ld, base, scope, filter, attrs, attrsonly ))
== -1 )
return( ld->ld_errno );
......@@ -421,6 +425,8 @@ ldap_search_s(
{
int msgid;
*res = NULL;
if ( (msgid = ldap_search( ld, base, scope, filter, attrs, attrsonly ))
== -1 )
return( ld->ld_errno );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment