summaryrefslogtreecommitdiffstats
path: root/core/gpslocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/gpslocation.cpp')
-rw-r--r--core/gpslocation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp
index e0b176f58..d0bbcdc8f 100644
--- a/core/gpslocation.cpp
+++ b/core/gpslocation.cpp
@@ -137,7 +137,9 @@ QString GpsLocation::currentPosition()
if (delta < 300) {
// we can simply use the last position that we tracked
gpsTracker gt = m_trackers.last();
- QString gpsString = printGPSCoords(&gt.location);
+ char *gps = printGPSCoords(&gt.location);
+ QString gpsString = gps;
+ free(gps);
qDebug() << "returning last position" << gpsString;
return gpsString;
} else {