[gnome-system-monitor] Fix memory leak in fill_image_buffer_from_resource().
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Fix memory leak in fill_image_buffer_from_resource().
- Date: Thu, 18 Aug 2016 21:32:37 +0000 (UTC)
commit 410710a0eb1a48da8fdb538b8f728da2e4a093e1
Author: Eric R. Schulz <eric ers35 com>
Date: Thu Aug 18 16:58:48 2016 -0400
Fix memory leak in fill_image_buffer_from_resource().
https://bugzilla.gnome.org/show_bug.cgi?id=770116
src/gsm_color_button.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gsm_color_button.c b/src/gsm_color_button.c
index d76eed8..cf0299d 100644
--- a/src/gsm_color_button.c
+++ b/src/gsm_color_button.c
@@ -198,6 +198,7 @@ fill_image_buffer_from_resource (cairo_t *cr, const char *path)
path, (error ? error->message : "unknown error"));
if (error)
g_error_free(error);
+ g_bytes_unref(bytes);
return NULL;
}
@@ -208,6 +209,7 @@ fill_image_buffer_from_resource (cairo_t *cr, const char *path)
rsvg_handle_render_cairo (handle, tmp_cr);
cairo_destroy (tmp_cr);
g_object_unref (handle);
+ g_bytes_unref(bytes);
return tmp_surface;
}
@@ -237,6 +239,7 @@ gsm_color_button_draw (GtkWidget *widget, cairo_t * cr)
gtk_style_context_get_color (context, GTK_STATE_FLAG_INSENSITIVE, color);
}
gdk_cairo_set_source_rgba (cr, color);
+ gdk_rgba_free(color);
width = gdk_window_get_width (gtk_widget_get_window (widget));
height = gdk_window_get_height(gtk_widget_get_window (widget));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]