Mercurial > dropbear
changeset 1003:7668ca9ae132
Fix bad multi-statement define for m_free(), detected by Coverity
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 28 Jan 2015 22:43:01 +0800 |
parents | 97d1e54941fd |
children | d63b569a7c86 |
files | dbutil.h |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dbutil.h Wed Jan 28 22:42:29 2015 +0800 +++ b/dbutil.h Wed Jan 28 22:43:01 2015 +0800 @@ -91,7 +91,7 @@ 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();