Re: msi 2: Remove redundant NULL checks before x_Release
2 Dec
2006
2 Dec
'06
2:36 a.m.
James Hawkins wrote:
Changelog: * Remove redundant NULL checks before x_Release.
obj->Release() will read the vtable pointer from the object, and that will crash if obj is NULL, so these checks are needed. The following code will crash: IUnknown *obj = NULL; IUnknown_Release(obj); You can see this looking at the definition of the IUnknown_Release macro: include/unknwn.h:#define IUnknown_Release(p) (p)->lpVtbl->Release(p) Mike
6955
Age (days ago)
6955
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mike McCormack