From: John Wolfe Date: Tue, 27 Oct 2020 00:29:54 +0000 (-0700) Subject: Fix a memory leak in HgfsOplockMonitorFileChange X-Git-Tag: stable-11.3.0~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1548fae0093271462d23bb5d66eb9c2e6521fece;p=thirdparty%2Fopen-vm-tools.git Fix a memory leak in HgfsOplockMonitorFileChange In the error case, "data" was not freed. --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerOplockMonitor.c b/open-vm-tools/lib/hgfsServer/hgfsServerOplockMonitor.c index 1d97e5c45..8e20f10b4 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerOplockMonitor.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerOplockMonitor.c @@ -351,6 +351,7 @@ error: free(monitorData->utf8Name); free(monitorData); } + free(data); MXUser_ReleaseExclLock(oplockMonitorLock); return HGFS_OPLOCK_INVALID_MONITOR_HANDLE;