[asterisk-dev] [Code Review] Fix XML documentation on non-Linux platforms.
Tilghman Lesher
tlesher at digium.com
Tue Mar 9 16:28:44 CST 2010
> On 2010-03-09 15:58:35, Mark Michelson wrote:
> > /trunk/main/xmldoc.c, lines 1887-1900
> > <https://reviewboard.asterisk.org/r/536/diff/1/?file=8425#file8425line1887>
> >
> > I would suspect that if glob() fails on the second or further invocation, then prior to returning, you should call globfree(&globbuf) to free memory allocated from the previous glob() calls.
> >
> > Myy manpage isn't particularly clear on the matter, so it may be that glob() takes care of this itself and will never require memory to be freed if an error is returned.
Probably the safest way to do this is to make sure that globbuf is initialized to NULL. That way, if it didn't allocate anything, you aren't passing garbage data to the free function.
- Tilghman
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/536/#review1644
-----------------------------------------------------------
On 2010-03-09 16:17:14, Jason Parker wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/536/
> -----------------------------------------------------------
>
> (Updated 2010-03-09 16:17:14)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Solaris glob() doesn't support GLOB_BRACE, so XML documentation wasn't being loaded. Instead, let's switch to a slow and stupid method.
>
>
> This addresses bug 16688.
> https://issues.asterisk.org/view.php?id=16688
>
>
> Diffs
> -----
>
> /trunk/main/xmldoc.c 251533
>
> Diff: https://reviewboard.asterisk.org/r/536/diff
>
>
> Testing
> -------
>
> Documentation still loads as expected on Linux.
>
>
> Thanks,
>
> Jason
>
>
More information about the asterisk-dev
mailing list