From 5cb781983096fd32e47c46b7fa1961ac7b5f1a50 Mon Sep 17 00:00:00 2001 From: Zhang Zhaolong Date: Sat, 26 Apr 2014 12:19:28 +0800 Subject: [PATCH] client-common: fix memory leak in case of error out. --- client/common/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/common/file.c b/client/common/file.c index c73be9198..62114f485 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -674,6 +674,7 @@ BOOL freerdp_client_write_rdp_file(const rdpFile* file, const char* name, BOOL u if (freerdp_client_write_rdp_file_buffer(file, buffer, length + 1) != length) { fprintf(stderr, "freerdp_client_write_rdp_file: error writing to output buffer\n"); + free(buffer); return FALSE; }