summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-26 14:10:49 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-26 14:10:53 -0800
commitda1d6e97f63e53f26b92c6709fed6423070e10c9 (patch)
treee1741dd05df2181e4354e80a47babe714bb0d67f /core
parent0e94c21a55f713af300ff0fbf59ddee9558c3a0c (diff)
downloadsubsurface-da1d6e97f63e53f26b92c6709fed6423070e10c9.tar.gz
Cleanup: avoid memory leak
Coverity CID 208337 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/libdivecomputer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index fde142e0d..70b747114 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -804,6 +804,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
if (!devdata->force_download && find_dive(&dive->dc)) {
const char *date_string = get_dive_date_c_string(dive->when);
dev_info(devdata, translate("gettextFromC", "Already downloaded dive at %s"), date_string);
+ free((void *)date_string);
goto error_exit;
}