summaryrefslogtreecommitdiffstats
path: root/chrome/browser/rlz
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 01:07:20 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 01:07:20 +0000
commit1147c088a7c2b047f4d12b41500777ada7293e1c (patch)
tree30de7458e75fd66fb9b3d150abb2512470d23905 /chrome/browser/rlz
parent8cdc6be1ec90ec5b8e8f95c55ba84e54ba67259e (diff)
downloadchromium_src-1147c088a7c2b047f4d12b41500777ada7293e1c.zip
chromium_src-1147c088a7c2b047f4d12b41500777ada7293e1c.tar.gz
chromium_src-1147c088a7c2b047f4d12b41500777ada7293e1c.tar.bz2
Coverity: check module for NULL before calling GetProcAddress.
CID=5168,5169 TEST=none BUG=none Review URL: http://codereview.chromium.org/257043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/rlz')
-rw-r--r--chrome/browser/rlz/rlz.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 1d482424..57e0f6a 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -75,8 +75,10 @@ SendFinancialPingFn send_ping = NULL;
template <typename FuncT>
FuncT WireExport(HMODULE module, const char* export_name) {
+ if (!module)
+ return NULL;
void* entry_point = ::GetProcAddress(module, export_name);
- return (module)? reinterpret_cast<FuncT>(entry_point) : NULL;
+ return reinterpret_cast<FuncT>(entry_point);
}
HMODULE LoadRLZLibraryInternal(int directory_key) {