From: claudio Date: Mon, 1 Jun 2015 09:54:16 +0000 (+0000) Subject: Fix memory leak in error case. OK bluhm@ benno@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9629c4773c8584b90494df83833148a1af5c75df;p=openbsd Fix memory leak in error case. OK bluhm@ benno@ --- diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c index 557b5fd783a..e40014da9ef 100644 --- a/usr.sbin/relayd/relay_http.c +++ b/usr.sbin/relayd/relay_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay_http.c,v 1.47 2015/05/22 01:34:13 jsg Exp $ */ +/* $OpenBSD: relay_http.c,v 1.48 2015/06/01 09:54:16 claudio Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -275,8 +275,10 @@ relay_read_http(struct bufferevent *bev, void *arg) goto lookup; } else if (cre->line == 1 && cre->dir == RELAY_DIR_REQUEST) { if ((desc->http_method = relay_httpmethod_byname(key)) - == HTTP_METHOD_NONE) + == HTTP_METHOD_NONE) { + free(line); goto fail; + } /* * Decode request path and query */