From: Oliver Kurth Date: Wed, 8 May 2019 22:27:19 +0000 (-0700) Subject: Fix a trivial Coverity-reported memory leak. X-Git-Tag: stable-11.0.0~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5823224051da0318facf10e0732baa9f55334fc;p=thirdparty%2Fopen-vm-tools.git 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. --- diff --git a/open-vm-tools/vgauth/lib/authPosix.c b/open-vm-tools/vgauth/lib/authPosix.c index dfaeb92ba..151e59528 100644 --- a/open-vm-tools/vgauth/lib/authPosix.c +++ b/open-vm-tools/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; }