[Spice-commits] src/spice-widget.c src/spice-widget-egl.c
Pavel Grunt
pgrunt at kemper.freedesktop.org
Thu Apr 7 16:06:06 UTC 2016
src/spice-widget-egl.c | 2 ++
src/spice-widget.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 4c3370bd04b312b0aa26eda8c7af2fa04f4cb99b
Author: Pavel Grunt <pgrunt at redhat.com>
Date: Thu Apr 7 15:10:06 2016 +0200
Do not call spice_egl_cursor_set when egl is disabled
Fix memory leaks of cursor:
240 bytes in 1 blocks are possibly lost in loss record 10,786 of 12,521
at 0x4C2FA60: calloc (vg_replace_malloc.c:711)
by 0x3700F861: ralloc_size (ralloc.c:113)
by 0x36FD2D68: UnknownInlinedFun (list.h:83)
by 0x36FD2D68: (anonymous namespace)::builtin_variable_generator::add_const(char const*, int) (builtin_variables.cpp:578)
by 0x36FD4775: generate_constants (builtin_variables.cpp:725)
by 0x36FD4775: _mesa_glsl_initialize_variables(exec_list*, _mesa_glsl_parse_state*) (builtin_variables.cpp:1303)
by 0x36E03D26: create_new_program (ff_fragment_shader.cpp:1225)
by 0x36E03D26: _mesa_get_fixed_func_fragment_program (ff_fragment_shader.cpp:1295)
by 0x36E9A577: update_program (state.c:157)
by 0x36E9A577: _mesa_update_state_locked (state.c:473)
by 0x36E9A6A0: _mesa_update_state (state.c:504)
by 0x36EB05E4: teximage (teximage.c:2947)
by 0x36EB211F: _mesa_TexImage2D (teximage.c:3009)
by 0x4E5024F: spice_egl_cursor_set (spice-widget-egl.c:497)
by 0x4E4BFD7: cursor_set (spice-widget.c:2346)
by 0x50D6245: g_cclosure_user_marshal_VOID__INT_INT_INT_INT_POINTER (spice-marshal.c:245)
diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index c54d9f6..7611b0b 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -484,6 +484,8 @@ void spice_egl_cursor_set(SpiceDisplay *display)
SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
GdkPixbuf *image = d->mouse_pixbuf;
+ g_return_if_fail(d->egl.enabled);
+
if (image == NULL)
return;
diff --git a/src/spice-widget.c b/src/spice-widget.c
index f30b80f..6f638fb 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2343,7 +2343,8 @@ static void cursor_set(SpiceCursorChannel *channel,
g_warn_if_reached();
#ifndef G_OS_WIN32
- spice_egl_cursor_set(display);
+ if (d->egl.enabled)
+ spice_egl_cursor_set(display);
#endif
if (d->show_cursor) {
/* unhide */
More information about the Spice-commits
mailing list