summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-01-28 22:43:01 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-01-28 22:43:01 +0800
commit9174de47a9f8dfa817e65bea99fd3ee8b8f85511 (patch)
treebc3ee542381744a374b5020631f9038e5dc52579
parentd857faf18e5426e6bf2070cff67b7b23c10946a4 (diff)
Fix bad multi-statement define for m_free(), detected by Coverity
-rw-r--r--dbutil.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbutil.h b/dbutil.h
index 774c3ce..cdad9bc 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -91,7 +91,7 @@ void m_close(int fd);
void * m_malloc(size_t size);
void * m_strdup(const char * str);
void * m_realloc(void* ptr, size_t size);
-#define m_free(X) free(X); (X) = NULL;
+#define m_free(X) do {free(X); (X) = NULL;} while (0);
void m_burn(void* data, unsigned int len);
void setnonblocking(int fd);
void disallow_core();