From 75d30b8d700412a26b2e752776c3b3a34ad37693 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 3 Dec 2015 09:47:09 -0800 Subject: Uemis downloader: don't leak memory Don't just clear out the buffer pointer, free the memory, first. Signed-off-by: Dirk Hohndel --- subsurface-core/uemis-downloader.c | 1 + 1 file changed, 1 insertion(+) (limited to 'subsurface-core/uemis-downloader.c') diff --git a/subsurface-core/uemis-downloader.c b/subsurface-core/uemis-downloader.c index 0f589667b..97ef551aa 100644 --- a/subsurface-core/uemis-downloader.c +++ b/subsurface-core/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) { -- cgit v1.2.3-70-g09d2