From 4b8f2d5137e5978f81a0e81a23b438daa28f5a04 Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Fri, 17 Aug 2018 12:43:49 +0200 Subject: [PATCH] channels/drive: Fix leak found by covscan leaked_storage: Variable "outStr" going out of scope leaks the storage it points to. --- channels/drive/client/drive_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/channels/drive/client/drive_main.c b/channels/drive/client/drive_main.c index 10ebbbd..d6bfd6d 100644 --- a/channels/drive/client/drive_main.c +++ b/channels/drive/client/drive_main.c @@ -527,6 +527,7 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive, if (!Stream_EnsureRemainingCapacity(output, 12 + length)) { + free(outStr); WLog_ERR(TAG, "Stream_EnsureRemainingCapacity failed!"); return CHANNEL_RC_NO_MEMORY; } -- 2.7.4