summaryrefslogtreecommitdiffstats
path: root/uemis-downloader.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-20 21:34:15 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-20 21:35:54 -0700
commit3fb5f84e1196872ed33d40debd53f635a112b411 (patch)
tree935c6ab6f76cb7266b3a9f7c9ade1485c82e17ca /uemis-downloader.c
parent82ff9fc9c85c8c2174fbf52bf2bba1a71239869b (diff)
downloadsubsurface-3fb5f84e1196872ed33d40debd53f635a112b411.tar.gz
Uemis downloader: avoid double free
A well intentioned attempt in commit ff860b3c044a ("uemis-downloader - resource leaks") to fix resource leaks actually introduced a bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r--uemis-downloader.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 521cd7ef5..8f3549c97 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -718,8 +718,6 @@ static bool process_raw_buffer(device_data_t *devdata, uint32_t deviceid, char *
/* is it a valid entry or nothing ? */
if (strcmp(tp, "1.0") != 0 || strstr(inbuf, "divelog{1.0{{{{")) {
free(buf);
- free(tp);
- free(bp);
return false;
}
} else if (strcmp(tp, "dive") == 0) {
@@ -727,15 +725,11 @@ static bool process_raw_buffer(device_data_t *devdata, uint32_t deviceid, char *
tp = next_token(&bp);
if (strcmp(tp, "1.0") != 0) {
free(buf);
- free(tp);
- free(bp);
return false;
}
} else {
/* don't understand the buffer */
free(buf);
- free(bp);
- free(tp);
return false;
}
if (log) {
@@ -749,8 +743,6 @@ static bool process_raw_buffer(device_data_t *devdata, uint32_t deviceid, char *
#endif
/* oops, this one isn't valid, suggest to try the previous one */
free(buf);
- free(bp);
- free(tp);
return false;
}
}