From ea21126f627c69a50130e7659970f148313eae17 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 9 Feb 2013 21:29:59 +0200 Subject: Fixed a memory leak related to the satelite icon divelist.c:get_gps_icon_for_dive() In all callers of the function use gdk_pixbuf_unref() to release the returned GdkPixbuf (but also check for NULL). Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- divelist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/divelist.c b/divelist.c index 0b5e6245d..288b78753 100644 --- a/divelist.c +++ b/divelist.c @@ -921,6 +921,8 @@ static void fill_one_dive(struct dive *dive, DIVE_SUIT, suit, -1); + if (icon) + gdk_pixbuf_unref(icon); free(location); free(cylinder); free(suit); @@ -1325,6 +1327,8 @@ static void fill_dive_list(void) DIVE_TEMPERATURE, dive->watertemp.mkelvin, DIVE_SAC, 0, -1); + if (icon) + gdk_pixbuf_unref(icon); gtk_tree_store_append(liststore, &iter, NULL); gtk_tree_store_set(liststore, &iter, DIVE_INDEX, i, -- cgit v1.2.3-70-g09d2