On Mon, Sep 14, 2009 at 09:50:33AM +0100, Matthew Booth wrote:
On 12/09/09 11:05, Richard W.M. Jones wrote:
On Fri, Sep 11, 2009 at 05:50:30PM +0100, Matthew Booth wrote:
+ out = realloc (out, out_len + 1); + if (NULL == out) { + reply_with_perror ("realloc"); + return 0; + }
Unfortunately this leaves the original buffer [out] still allocated on the error path.
Another good catch :) I'll have to check my string list patch for this too, although I think I always exit() there. Updated patch sent.
[...]
As before, this needs tests.
It contains a test! It's a pretty simple function.
Sorry, I was confusing the echo_daemon command with the purpose of adding this command (the quoting stuff). It's the quoting stuff that (will) need tests. This patch is OK if you fix the realloc problem. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top