Remove unnecessary null pointer checks
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 383
- Avg merge
- 8d 18h
- Merged PRs (30d)
- 4
Description
[An extra null pointer check is not needed in functions](https://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first "Free a null pointer anyway or check first?") like the following.
- [CreateLinkFile](https://github.com/intel/media-driver/blob/76b1eae796e8d1a697ac63a54f04c8d866c8b348/Tools/MediaDriverTools/GenKrnBin/linkfile.cpp#L230-L231)
- [drmFree](https://github.com/intel/media-driver/blob/76b1eae796e8d1a697ac63a54f04c8d866c8b348/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c#L158-L162)
- [KrnToHex](https://github.com/intel/media-driver/blob/76b1eae796e8d1a697ac63a54f04c8d866c8b348/Tools/MediaDriverTools/KrnToHex/KrnToHex.cpp#L127-L131)
- [MOS_XE_SAFE_FREE](https://github.com/intel/media-driver/blob/76b1eae796e8d1a697ac63a54f04c8d866c8b348/media_softlet/linux/common/os/xe/include/mos_bufmgr_xe.h#L81-L85)
Contributor guide
Assessment
This issue has not been assessed yet.