summaryrefslogtreecommitdiffstats
path: root/load-git.c
diff options
context:
space:
mode:
Diffstat (limited to 'load-git.c')
-rw-r--r--load-git.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/load-git.c b/load-git.c
index bd64da478..932eb50a5 100644
--- a/load-git.c
+++ b/load-git.c
@@ -184,9 +184,10 @@ static void parse_dive_gps(char *line, struct membuffer *str, void *_dive)
} else {
if (dive_site_has_gps_location(ds) &&
(ds->latitude.udeg != latitude.udeg || ds->longitude.udeg != longitude.udeg)) {
+ const char *coords = printGPSCoords(latitude.udeg, longitude.udeg);
// we have a dive site that already has GPS coordinates
- ds->notes = add_to_string(ds->notes, translate("gettextFromC", "multiple gps locations for this dive site; also %s\n"),
- printGPSCoords(latitude.udeg, longitude.udeg));
+ ds->notes = add_to_string(ds->notes, translate("gettextFromC", "multiple gps locations for this dive site; also %s\n"), coords);
+ free((void *)coords);
}
ds->latitude = latitude;
ds->longitude = longitude;
@@ -218,6 +219,7 @@ static void parse_dive_location(char *line, struct membuffer *str, void *_dive)
ds->notes = add_to_string(ds->notes, translate("gettextFromC", "additional name for site: %s\n"), name);
}
}
+ free(name);
}
static void parse_dive_divemaster(char *line, struct membuffer *str, void *_dive)