summaryrefslogtreecommitdiffstats
path: root/uemis-downloader.c
diff options
context:
space:
mode:
authorGravatar Claudiu Olteanu <olteanu.claudiu@ymail.com>2015-03-23 20:22:55 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-24 09:46:46 -0700
commitc46bbf3b5ec50379eee3afb874089b7660da937c (patch)
treef0df4c6c6d4e11b592a7c43c71ed9b1322c78480 /uemis-downloader.c
parentd7f4ea66c299008554b70a526d742979667de302 (diff)
downloadsubsurface-c46bbf3b5ec50379eee3afb874089b7660da937c.tar.gz
Clean req.txt file path
This patch cleans the path allocated for req.txt file path. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r--uemis-downloader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 3f2225357..521cd7ef5 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -861,8 +861,10 @@ const char *do_uemis_import(device_data_t *data)
if (dive_table.nr == 0)
keep_number = true;
uemis_info(translate("gettextFromC", "Initialise communication"));
- if (!uemis_init(mountpath))
+ if (!uemis_init(mountpath)) {
+ free(reqtxt_path);
return translate("gettextFromC", "Uemis init failed");
+ }
if (!uemis_get_answer(mountpath, "getDeviceId", 0, 1, &result))
goto bail;
deviceid = strdup(param_buff[0]);
@@ -994,5 +996,6 @@ bail:
result = param_buff[2];
}
free(deviceid);
+ free(reqtxt_path);
return result;
}