summaryrefslogtreecommitdiffstats
path: root/src/web_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/web_buffer.c')
-rw-r--r--src/web_buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/web_buffer.c b/src/web_buffer.c
index 6203db0f..9f9ceda6 100644
--- a/src/web_buffer.c
+++ b/src/web_buffer.c
@@ -359,8 +359,9 @@ BUFFER *buffer_create(size_t size)
return(b);
}
-void buffer_free(BUFFER *b)
-{
+void buffer_free(BUFFER *b) {
+ if(unlikely(!b)) return;
+
buffer_overflow_check(b);
debug(D_WEB_BUFFER, "Freeing web buffer of size %zu.", b->size);