From patchwork Thu Mar 8 14:20:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Engelmayer X-Patchwork-Id: 145538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 50EF1B6F9F for ; Fri, 9 Mar 2012 01:30:59 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755997Ab2CHOah (ORCPT ); Thu, 8 Mar 2012 09:30:37 -0500 Received: from mail1.frequentis.com ([212.186.194.131]:12941 "EHLO mail1.frequentis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756021Ab2CHOa0 (ORCPT ); Thu, 8 Mar 2012 09:30:26 -0500 X-IronPort-AV: E=Sophos;i="4.73,552,1325458800"; d="scan'208";a="11035247" Received: from vie190nt.frequentis.frq ([172.16.1.190]) by mail1.frequentis.com with ESMTP; 08 Mar 2012 15:20:38 +0100 Received: from frequentis.com (10.16.10.10) by VIE190NT.frequentis.frq (172.16.1.190) with Microsoft SMTP Server id 14.1.355.2; Thu, 8 Mar 2012 15:20:38 +0100 Date: Thu, 8 Mar 2012 15:20:37 +0100 From: Christian Engelmayer To: CC: , Subject: [PATCH] iptables: missing free() in function cache_add_entry() Message-ID: <20120308152037.639adf51@frequentis.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Franz Flasch Fixed a memory leak in the error path of function cache_add_entry(). Signed-off-by: Franz Flasch Signed-off-by: Christian Engelmayer --- -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- iptables-1.4.12.2/libiptc/libiptc.c 2012-01-02 18:19:09.000000000 +0100 +++ iptables-1.4.12.2-modified/libiptc/libiptc.c 2012-03-08 14:24:24.000000000 +0100 @@ -1012,6 +1012,7 @@ new_rule: if (t->target.u.target_size != ALIGN(sizeof(STRUCT_STANDARD_TARGET))) { errno = EINVAL; + free(r); return -1; }