[Spice-devel] Is it a possible memory leak (spice-gtk/src/channel-display.c)?

Frediano Ziglio fziglio at redhat.com
Wed Sep 9 12:59:30 UTC 2020


> Hi all, for the latest commit in 'spice-gtk/src/channel-display.c', in the
> static function
> 'create_canvas', the first returning point (line 997) and the 'if
> (surface->primary)' (line 1036)
> is not taken then the second returning point, the allocated memory for
> surface would be lost.

> All the calling site store surface on the stack.

> Can anyone confirm this?

> --
> Best Regards

> Ding Fei
> E-mail: danix800 at gmail.com

Indeed, you should g_free(surface).

OT: And apparently format is not used any more.

Frediano 



More information about the Spice-devel mailing list