diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-05-05 15:38:12 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-05-05 15:38:12 +1000 |
commit | 636a7b25ef3eca6b98009330f4d35337d4f35717 (patch) | |
tree | 7cc2e03ad96e206cbe73343feef10197023a37da /src/include/misc.h | |
parent | eaa7b5f0fcc62f356c33a2c56f45b609a73ca5dd (diff) | |
parent | 75c22bc0c662622c14e5c47d99ff262cede2c6bf (diff) | |
download | mongodb-3.3.6.tar.gz |
Merge branch 'develop' into mongodb-3.4mongodb-3.3.6
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 { \ |