memory_utils: directly NULL ptr in free_disarm()

This should keep coverity happy. Fixes: Coverity 1461757. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 9e135953
...@@ -44,7 +44,7 @@ define_cleanup_function(DIR *, closedir); ...@@ -44,7 +44,7 @@ define_cleanup_function(DIR *, closedir);
#define free_disarm(ptr) \ #define free_disarm(ptr) \
({ \ ({ \
free(ptr); \ free(ptr); \
move_ptr(ptr); \ ptr = NULL; \
}) })
static inline void free_disarm_function(void *ptr) static inline void free_disarm_function(void *ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment