diff options
-rw-r--r-- | src/lib/ndpi_main.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index a10b194e7..bd986f986 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -100,16 +100,13 @@ void *ndpi_calloc(unsigned long count, size_t size) { /* ****************************************** */ void ndpi_free(void *ptr) { - if(_ndpi_free){ - if(ptr){ - _ndpi_free(ptr); - } - }else{ - if(ptr){ - free(ptr); - } - } - + if(_ndpi_free) { + if(ptr) + _ndpi_free(ptr); + } else { + if(ptr) + free(ptr); + } } /* ****************************************** */ |