[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: commit: ldap/servers/slapd result.c value.c
- To: kurt@OpenLDAP.org
- Subject: Re: commit: ldap/servers/slapd result.c value.c
- From: Pierangelo Masarati <ando@sys-net.it>
- Date: Thu, 06 Apr 2006 22:14:31 +0200
- Cc: OpenLDAP Commit <openldap-commit2devel@OpenLDAP.org>
- In-reply-to: <200604061909.k36J9xwK073242@cantor.openldap.org>
- References: <200604061909.k36J9xwK073242@cantor.openldap.org>
On Thu, 2006-04-06 at 19:09 +0000, kurt@OpenLDAP.org wrote:
> value.c 1.79.2.11 -> 1.79.2.12
>
> Log Message:
> Code which doesn't hanlding allocation failure should use
> ch_ routines, not SLAP_ macros
I believe the change in value.c is incorrect; if you use ch_realloc()
you shouldn't check the return value, as ch_realloc() will cause an
assert failure; or you handle the failure. In this latter case, the
pointer should not be lost and a temporary should be used. This is the
best we can do right now in terms of gracefully handling a realloc()
failure.
p.
Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati@sys-net.it
------------------------------------------