From c46bbf3b5ec50379eee3afb874089b7660da937c Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Mon, 23 Mar 2015 20:22:55 +0200 Subject: Clean req.txt file path This patch cleans the path allocated for req.txt file path. Signed-off-by: Claudiu Olteanu Signed-off-by: Dirk Hohndel --- uemis-downloader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2