Blob Blame History Raw
From 8914b79dadae708672657e8879832d61c4f2cde1 Mon Sep 17 00:00:00 2001
From: Cathy Avery <cavery@redhat.com>
Date: Tue, 21 Apr 2020 10:38:45 +0200
Subject: [PATCH 1/3] Fix a trivial memory leak in namespacetool.c.

RH-Author: Cathy Avery <cavery@redhat.com>
Message-id: <20200331185439.5940-2-cavery@redhat.com>
Patchwork-id: 94516
O-Subject: [RHEL-8.2.1 open-vm-tools PATCH 1/2] Fix a trivial memory leak in namespacetool.c.
Bugzilla: 1811729
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>

commit 8dbd6e991315bb1b0a18c369c4d2bb165ef1f184
Author: Oliver Kurth <okurth@vmware.com>
Date: Tue, 17 Mar 2020 14:36:55 -0700

    Fix a trivial memory leak in namespacetool.c.

    Fix a memory leak reported by a customer based on their Coverity
    scans of open-vm-tools.

Signed-off-by: Cathy Avery <cavery@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 open-vm-tools/namespacetool/namespacetool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/open-vm-tools/namespacetool/namespacetool.c b/open-vm-tools/namespacetool/namespacetool.c
index 171e352..bfd003d 100644
--- a/open-vm-tools/namespacetool/namespacetool.c
+++ b/open-vm-tools/namespacetool/namespacetool.c
@@ -233,6 +233,7 @@ GetValueFromStdin(gchar **data, gsize *length)
       *length = 0;
    }
    g_free(gErr);
+   g_io_channel_unref(iochannel);
    return retVal;
 }
 
-- 
1.8.3.1