diff options
author | Claudiu Olteanu <olteanu.claudiu@ymail.com> | 2015-03-23 20:22:55 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-03-24 09:46:46 -0700 |
commit | c46bbf3b5ec50379eee3afb874089b7660da937c (patch) | |
tree | f0df4c6c6d4e11b592a7c43c71ed9b1322c78480 /uemis-downloader.c | |
parent | d7f4ea66c299008554b70a526d742979667de302 (diff) | |
download | subsurface-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.c | 5 |
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; } |