[Spice-devel] [spice-gtk] sasl: Rework memory handling in spice_channel_perform_auth_sasl()

Christophe Fergeau cfergeau at redhat.com
Thu Oct 17 10:53:36 CEST 2013


On Wed, Oct 16, 2013 at 01:13:10PM -0400, Marc-André Lureau wrote:
> 
> 
> ----- Original Message -----
> > While looking at the SASL code, I noticed some memory leaks in error paths.
> > This commit adds a cleanup: block to free some of the memory dynamically
> > allocated in that function, and remove the corresponding g_free() from
> > the regular code flow. This should ensure that both the regular path
> > and the error paths free the same memory.
> > ---
> > 
> > Something like this?
> 
> yes! ack (assuming it is tested :)

It's tested in the sense that I've successfully a sasl session with that
change, and that I've added random goto error in that function, and did
not get bad results (auth failed).
I can test some more with valgrind if that makes you more confident about
the code ;)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131017/2889909e/attachment-0001.pgp>


More information about the Spice-devel mailing list