From 98345ad1ae6960263f1e0c76cda6a45a2313d7e1 Mon Sep 17 00:00:00 2001 From: Cathy Avery Date: Thu, 25 Jul 2019 12:32:34 +0200 Subject: [PATCH 11/16] Fix a trivial Coverity-reported memory leak. RH-Author: Cathy Avery Message-id: <20190725123239.18274-12-cavery@redhat.com> Patchwork-id: 89722 O-Subject: [RHEL8.1 open-vm-tools PATCH 11/16] Fix a trivial Coverity-reported memory leak. Bugzilla: 1602648 RH-Acked-by: Vitaly Kuznetsov RH-Acked-by: Miroslav Rezanina commit a5823224051da0318facf10e0732baa9f55334fc Author: Oliver Kurth Date: Wed May 8 15:27:19 2019 -0700 Fix a trivial Coverity-reported memory leak. If AuthLoadPAM doesn't find all the needed symbols from the pam library, then dlclose the library, as is already done for the same-named funtion in bora/lib/auth/authPosix.c. Signed-off-by: Cathy Avery Signed-off-by: Miroslav Rezanina --- open-vm-tools/vgauth/lib/authPosix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vgauth/lib/authPosix.c b/vgauth/lib/authPosix.c index dfaeb92..151e595 100644 --- a/vgauth/lib/authPosix.c +++ b/vgauth/lib/authPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2017,2019 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -128,7 +128,7 @@ AuthLoadPAM(void) if (!symbol) { Warning("PAM library does not contain required function: %s\n", dlerror()); - + dlclose(pam_library); return FALSE; } -- 1.8.3.1