mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixed a small memory leak in divelist.c
In fill_one_dive(), cylinder and location strings are obtained via get_string(), which needs to allocated a litte bit of memory. After passing the two pointers ('cylinder' and 'location') as arguments to gtk_list_store_set() it is safe to release them. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
3c542b5a41
commit
307240d6f6
1 changed files with 3 additions and 0 deletions
|
@ -556,6 +556,9 @@ static void fill_one_dive(struct dive *dive,
|
|||
DIVE_OTU, dive->otu,
|
||||
DIVE_TOTALWEIGHT, total_weight(dive),
|
||||
-1);
|
||||
|
||||
free(location);
|
||||
free(cylinder);
|
||||
}
|
||||
|
||||
static gboolean set_one_dive(GtkTreeModel *model,
|
||||
|
|
Loading…
Add table
Reference in a new issue