[Libguestfs] [PATCH libguestfs] fish: don't read freed memory

Jim Meyering jim at meyering.net
Wed Aug 12 13:56:41 UTC 2009


Richard W.M. Jones wrote:

> On Wed, Aug 12, 2009 at 02:45:02PM +0200, Jim Meyering wrote:
>> Using the latest code, I was seeing a failure of the remote alloc part
>> of the test-remote.sh test:
>> The fix is to ensure that we close the file handle *after*,
>> not before calling xdr_destroy.
>>      fprintf (stderr, _("guestfish: protocol error: could not send initial greeting to server\n"));
>> -    fclose (fp);
>>      xdr_destroy (&xdr);
>> +    fclose (fp);
>>      return -1;
>
> Ouch, that's a very subtle and non-obvious bug.  Definite ACK.

ok. pushed




More information about the Libguestfs mailing list