On Thu, 15 May 2014 13:36:12 -0700
"U. Artie Eoff" wrote:
> asprintf returns -1 if memory allocation fails and that's what
> we're really protecting here. So check for -1 instead of > 0
> result.
>
> In general, when asprintf returns 0, then the memory allocation
> succeeded, but no bytes printe
asprintf returns -1 if memory allocation fails and that's what
we're really protecting here. So check for -1 instead of > 0
result.
In general, when asprintf returns 0, then the memory allocation
succeeded, but no bytes printed. If we only free the allocated
memory when the result is > 0, then we