Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed from PVS-Studio #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions CHashCheckClassFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ STDMETHODIMP CHashCheckClassFactory::CreateInstance( LPUNKNOWN pUnkOuter, REFIID

if (pUnkOuter) return(CLASS_E_NOAGGREGATION);

LPCHASHCHECK lpHashCheck = new CHashCheck;
if (lpHashCheck == NULL) return(E_OUTOFMEMORY);

HRESULT hr = lpHashCheck->QueryInterface(riid, ppv);
lpHashCheck->Release();
return(hr);
try {
LPCHASHCHECK lpHashCheck = new CHashCheck;
HRESULT hr = lpHashCheck->QueryInterface(riid, ppv);
lpHashCheck->Release();
return(hr);
}
catch (std::bad_alloc& ba)
{
return(E_OUTOFMEMORY);
}
}
1 change: 1 addition & 0 deletions CHashCheckClassFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define __CHASHCHECKCLASSFACTORY_HPP__

#include "globals.h"
#include <new>

class CHashCheckClassFactory : public IClassFactory
{
Expand Down
4 changes: 2 additions & 2 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#define HASHCHECK_NAME_STR "HashCheck Shell Extension"

// Full version: MUST be in the form of major,minor,revision,build
#define HASHCHECK_VERSION_FULL 2,4,0,55
#define HASHCHECK_VERSION_FULL 2,4,0,56

// String version: May be any suitable string
#define HASHCHECK_VERSION_STR "2.4.0.55"
#define HASHCHECK_VERSION_STR "2.4.0.56"

#ifdef _USRDLL
// PE version: MUST be in the form of major.minor
Expand Down