Re: webkit-1.8.0-2: Patches for review
Pino Toscano, le Mon 16 Apr 2012 22:51:01 +0200, a écrit :
> ... but then you leak readLinkBuffer in both the cases (error return
> value from readlink(), and success); you can do something like this:
>
> | CString resultString;
> | if (result >= 0 && result < sb.st_size)
> | resultString = CString(readLinkBuffer, result);
> | free(readLinkBuffer);
> | return resultString;
Ah, CString returns a new object, not a trivial object pointing at the
buffer? Then yes, it can simply be freed that way indeed.
Samuel
Reply to: