mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
mem_free_if(data) instead of if (data) mem_free(data). Shorter.
This commit is contained in:
parent
b0ea7cd7c1
commit
4fc6343407
@ -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)
|
if (add_fragment(conn->cached, conn->from, data, data_len) == 1)
|
||||||
conn->tries = 0;
|
conn->tries = 0;
|
||||||
|
|
||||||
if (data) mem_free(data);
|
mem_free_if(data);
|
||||||
if (zero || !http->length) shutdown_connection_stream(conn);
|
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)
|
if (add_fragment(conn->cached, conn->from, data, data_len) == 1)
|
||||||
conn->tries = 0;
|
conn->tries = 0;
|
||||||
|
|
||||||
if (data) mem_free(data);
|
mem_free_if(data);
|
||||||
if (!http->length) shutdown_connection_stream(conn);
|
if (!http->length) shutdown_connection_stream(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user