[Libguestfs] [PATCH] Add echo_daemon command

Matthew Booth mbooth at redhat.com
Mon Sep 14 08:50:33 UTC 2009


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.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the Libguestfs mailing list