summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 19:36:42 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 19:36:42 +0000
commit1fa0d7c0301696ab0932632ff22c2b33c79ddbce (patch)
treee835c6f40ed5833d45e70ee7eccc24f32aa9a07d /net
parent7a1d304b851acf753e3584ca9de9537c8808dd53 (diff)
downloadchromium_src-1fa0d7c0301696ab0932632ff22c2b33c79ddbce.zip
chromium_src-1fa0d7c0301696ab0932632ff22c2b33c79ddbce.tar.gz
chromium_src-1fa0d7c0301696ab0932632ff22c2b33c79ddbce.tar.bz2
Coverity: fix possible library leak in GSSAPISharedLibrary::LoadSharedLibrary.
CID=10899 BUG=none TEST=builds Review URL: http://codereview.chromium.org/2854004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_auth_gssapi_posix.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index 4ccdf40..6e41bdc 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -80,9 +80,12 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLibrary() {
const char* library_name = kLibraryNames[i];
FilePath file_path(library_name);
base::NativeLibrary lib = base::LoadNativeLibrary(file_path);
- // Only return this library if we can bind the functions we need.
- if (lib && BindMethods(lib))
- return lib;
+ if (lib) {
+ // Only return this library if we can bind the functions we need.
+ if (BindMethods(lib))
+ return lib;
+ base::UnloadNativeLibrary(lib);
+ }
}
LOG(WARNING) << "Unable to find a compatible GSSAPI library";
return NULL;
@@ -511,4 +514,3 @@ int HttpAuthGSSAPI::GetNextSecurityToken(const std::wstring& spn,
}
} // namespace net
-