From 6c2c49ad60d5e719d479e2664a8cf649b8279567 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sun, 17 Apr 2016 20:03:36 +0800 Subject: [PATCH] Fix #586 --- src/utils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils.h b/src/utils.h index a5653d02..16acd4f1 100644 --- a/src/utils.h +++ b/src/utils.h @@ -203,11 +203,11 @@ char *ss_strndup(const char *s, size_t n); int set_nofile(int nofile); #endif -inline void ss_free(void *ptr) -{ - free(ptr); - ptr = NULL; -} +#define ss_free(ptr) \ + do { \ + free(ptr); \ + ptr = NULL; \ + } while(0) inline void *ss_malloc(size_t size) {