On Mon, Nov 28, 2016 at 09:40:56AM +0100, Francois Gouget wrote:
> Tweak the code to clarify that conn->data.buf is set to NULL after the
> free() in udscs_read_complete().
> Note that this reset is needed to avoid a double-free in
> udscs_destroy_connection() if an error occurs while receiving
> the next message header.
> 
> Signed-off-by: Francois Gouget <[email protected]>
> ---
> 
> On Fri, 25 Nov 2016, Christophe Fergeau wrote:
> >
> > This memset should 'buf' to NULL. (can't remember if I took that into
> > account while writing the patch though :)
> 
> Maybe tweaking the code like below could help make this clearer. The 
> comment may be overkill, or maybe on the contrary it should be made more 
> explicit.

Does not hurt to make this explicit indeed,

Acked-by: Christophe Fergeau <[email protected]>

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to