From 4fc6343407921331cef13c67e79e74662437fceb Mon Sep 17 00:00:00 2001 From: witekfl Date: Fri, 4 Jan 2013 17:54:57 +0100 Subject: [PATCH] mem_free_if(data) instead of if (data) mem_free(data). Shorter. --- src/protocol/http/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index cbd729342..6f962cc7b 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -1206,7 +1206,7 @@ read_chunked_http_data(struct connection *conn, struct read_buffer *rb) if (add_fragment(conn->cached, conn->from, data, data_len) == 1) conn->tries = 0; - if (data) mem_free(data); + mem_free_if(data); if (zero || !http->length) shutdown_connection_stream(conn); } @@ -1274,7 +1274,7 @@ read_normal_http_data(struct connection *conn, struct read_buffer *rb) if (add_fragment(conn->cached, conn->from, data, data_len) == 1) conn->tries = 0; - if (data) mem_free(data); + mem_free_if(data); if (!http->length) shutdown_connection_stream(conn); }