From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1THIJM-0004kv-Oj for mharc-grub-devel@gnu.org; Thu, 27 Sep 2012 13:55:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THIJJ-0004jl-Tt for grub-devel@gnu.org; Thu, 27 Sep 2012 13:55:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THIJI-0007DF-Ny for grub-devel@gnu.org; Thu, 27 Sep 2012 13:55:41 -0400 Received: from e24smtp04.br.ibm.com ([32.104.18.25]:60815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THIJI-0007Bo-0i for grub-devel@gnu.org; Thu, 27 Sep 2012 13:55:40 -0400 Received: from /spool/local by e24smtp04.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Sep 2012 14:55:36 -0300 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp04.br.ibm.com (10.172.0.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 27 Sep 2012 14:55:34 -0300 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 4C522352001A for ; Thu, 27 Sep 2012 13:55:34 -0400 (EDT) Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q8RHtPol4935750 for ; Thu, 27 Sep 2012 14:55:25 -0300 Received: from d24av04.br.ibm.com (loopback [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q8RFtN3Q011823 for ; Thu, 27 Sep 2012 12:55:23 -0300 Received: from [9.18.174.246] (dhcp-9-18-174-246.br.ibm.com [9.18.174.246]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q8RFtNb4011816 for ; Thu, 27 Sep 2012 12:55:23 -0300 Message-ID: <50649314.10406@linux.vnet.ibm.com> Date: Thu, 27 Sep 2012 14:55:32 -0300 From: Gustavo Luiz Duarte User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: [PATCH] Fix crash on http Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12092717-8936-0000-0000-000008218AEC X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.104.18.25 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2012 17:55:43 -0000 Don't free file->data on receiving FIN flag since it is used all over without checking. http_close() will be called later to free that memory. Downstream bug: http://bugzilla.redhat.com/show_bug.cgi?id=860834 --- grub-core/net/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/net/http.c b/grub-core/net/http.c index a7542d1..a5f6f31 100644 --- a/grub-core/net/http.c +++ b/grub-core/net/http.c @@ -386,7 +386,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) data->sock = grub_net_tcp_open (file->device->net->server, HTTP_PORT, http_receive, - http_err, http_err, + http_err, NULL, file); if (!data->sock) { -- 1.7.11.4