summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-03 09:47:09 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-06 09:36:30 -0800
commit3029bc872cafdbefd51f007690ad87727184f722 (patch)
treeeeb92c442f5f9465285a45b80b64b24a222fa86b
parent16ce14a29eb10766577f9a178b998271c59e19db (diff)
downloadsubsurface-3029bc872cafdbefd51f007690ad87727184f722.tar.gz
Uemis downloader: don't leak memory
Don't just clear out the buffer pointer, free the memory, first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--uemis-downloader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 00d63dffe..0abc28cf9 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -516,6 +516,7 @@ static bool uemis_get_answer(const char *path, char *request, int n_param_in,
}
trigger_response(reqtxt_file, "n", filenr, file_length);
usleep(timeout);
+ free(mbuf);
mbuf = NULL;
mbuf_size = 0;
while (searching || assembling_mbuf) {