mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:23:24 +00:00
gps.c: Fixed a small memory leak
osm_gps_map_get_default_cache_directory() uses stdc:strdup to allocate memory for the returned string. Lets try to free the memory pointed by 'cachebasedir'. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
61698b9f55
commit
ef4a39c613
1 changed files with 1 additions and 0 deletions
1
gps.c
1
gps.c
|
@ -187,6 +187,7 @@ OsmGpsMap *init_map(void)
|
|||
osm_gps_map_layer_add(OSM_GPS_MAP(map), osd);
|
||||
g_object_unref(G_OBJECT(osd));
|
||||
free((void*)cachebasedir);
|
||||
free((void*)cachedir);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue