diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-02-09 21:30:01 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-09 11:41:20 -0800 |
commit | df8fb3be9876468fd2b80283774cce278c1aedf8 (patch) | |
tree | fdeebb77994ba6f9deae8e684bd857d6d0068d0a /subsurface-icon.svg | |
parent | 801b0832aec41cf878c9a384dc46ba72b65a4083 (diff) | |
download | subsurface-df8fb3be9876468fd2b80283774cce278c1aedf8.tar.gz |
gps.c: Make two more memory leak fixes and a small coding style change
1)
add_gps_point():
Apparently osm_gps_map_point_new_*() is leaking memory if the
point struct is not freed after the point is added to the
map osm_gps_map_track_add_point().
However the API for releasing a point is missing on
older Windows builds of the map library, so instead of
osm_gps_map_point_free() we simply call:
free((void *)point);
2)
init_map()
According to memory management tools
osm_gps_map_get_default_cache_directory() is using g_realloc
for eventual string expansion therefore we have to release at the
returned pointer.
3)
add_gps_point()
Also a small coding style change is made:
move the pointer symbol (*) near the name of the variable
instead of leaving spaces on both sides, like:
<type> * <name>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
...
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-icon.svg')
0 files changed, 0 insertions, 0 deletions