diff options
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Include/ShellBase.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ShellPkg/Include/ShellBase.h b/ShellPkg/Include/ShellBase.h index b764381522..d005544bcd 100644 --- a/ShellPkg/Include/ShellBase.h +++ b/ShellPkg/Include/ShellBase.h @@ -20,8 +20,9 @@ typedef VOID *SHELL_FILE_HANDLE; #ifndef SHELL_FREE_NON_NULL
#define SHELL_FREE_NON_NULL(Pointer) \
do { \
- if (Pointer != NULL) { \
- FreePool(Pointer); \
+ if ((Pointer) != NULL) { \
+ FreePool((Pointer)); \
+ (Pointer) = NULL; \
} \
} while(FALSE)
#endif //SHELL_FREE_NON_NULL
|