mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
363c38f557
commit
ea21126f62
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue