From 643a309537c888495c6e931f2d7ed5e6d0f769f8 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sun, 16 Nov 2014 14:40:30 +0100 Subject: [PATCH] Fixed memory leak. --- winpr/libwinpr/utils/wlog/wlog.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/winpr/libwinpr/utils/wlog/wlog.c b/winpr/libwinpr/utils/wlog/wlog.c index 34dc579a0..ca7d52be1 100644 --- a/winpr/libwinpr/utils/wlog/wlog.c +++ b/winpr/libwinpr/utils/wlog/wlog.c @@ -402,14 +402,20 @@ int WLog_ParseFilters() g_Filters = calloc(g_FilterCount, sizeof(wLogFilter)); if (!g_Filters) + { + free(strs); return -1; + } for (count = 0; count < g_FilterCount; count++) { status = WLog_ParseFilter(&g_Filters[count], strs[count]); if (status < 0) + { + free(strs); return -1; + } } free(strs);