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>
This commit is contained in:
Dirk Hohndel 2015-12-03 09:47:09 -08:00
parent f17041e1cb
commit 75d30b8d70

View file

@ -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) {