diff options
author | 2015-12-07 20:30:17 +0000 | |
---|---|---|
committer | 2015-12-07 20:30:17 +0000 | |
commit | b6fd73fcdc16f95a34f0dfda609091dca59bc456 (patch) | |
tree | 728c50f5507dfeaba07d7821257a6178697f451e | |
parent | No need to check for NULL before free(). (diff) | |
download | wireguard-openbsd-b6fd73fcdc16f95a34f0dfda609091dca59bc456.tar.xz wireguard-openbsd-b6fd73fcdc16f95a34f0dfda609091dca59bc456.zip |
No need to check for NULL before free().
-rw-r--r-- | usr.sbin/httpd/server_http.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c index fdf39f3cd63..dfbcf7e7c42 100644 --- a/usr.sbin/httpd/server_http.c +++ b/usr.sbin/httpd/server_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_http.c,v 1.102 2015/12/03 11:46:25 reyk Exp $ */ +/* $OpenBSD: server_http.c,v 1.103 2015/12/07 20:30:17 mmcc Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -590,8 +590,7 @@ server_read_httpchunks(struct bufferevent *bev, void *arg) case 0: /* Chunk is terminated by an empty newline */ line = evbuffer_readln(src, NULL, EVBUFFER_EOL_CRLF_STRICT); - if (line != NULL) - free(line); + free(line); if (server_bufferevent_print(clt, "\r\n") == -1) goto fail; clt->clt_toread = TOREAD_HTTP_CHUNK_LENGTH; |