diff options
Diffstat (limited to 'src/include/misc.h')
-rw-r--r-- | src/include/misc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/misc.h b/src/include/misc.h index 07d52c61eac..4c7c9572905 100644 --- a/src/include/misc.h +++ b/src/include/misc.h @@ -96,8 +96,9 @@ * the caller remember to put the & operator on the pointer. */ #define __wt_free(session, p) do { \ - if ((p) != NULL) \ - __wt_free_int(session, (void *)&(p)); \ + void *__p = &(p); \ + if (*(void **)__p != NULL) \ + __wt_free_int(session, __p); \ } while (0) #ifdef HAVE_DIAGNOSTIC #define __wt_overwrite_and_free(session, p) do { \ |