diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-02-09 21:29:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-09 11:40:20 -0800 |
commit | ea21126f627c69a50130e7659970f148313eae17 (patch) | |
tree | a864cd6a82166c3c23c0e4774bf0a5a38e1ae5ae /divelist.c | |
parent | 363c38f5578e6ab08ac4e80bb585ddd12f91c263 (diff) | |
download | subsurface-ea21126f627c69a50130e7659970f148313eae17.tar.gz |
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 <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 4 |
1 files changed, 4 insertions, 0 deletions
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, |