From patchwork Wed Nov 19 20:41:38 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Thery X-Patchwork-Id: 9631 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5FED7DDDEF for ; Thu, 20 Nov 2008 07:44:38 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbYKSUod (ORCPT ); Wed, 19 Nov 2008 15:44:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752892AbYKSUod (ORCPT ); Wed, 19 Nov 2008 15:44:33 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:52814 "EHLO ecfrec.frec.bull.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbYKSUoc (ORCPT ); Wed, 19 Nov 2008 15:44:32 -0500 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id B1E5D1A193B; Wed, 19 Nov 2008 21:44:28 +0100 (CET) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06773-05; Wed, 19 Nov 2008 21:44:25 +0100 (CET) Received: from cyclope.frec.bull.fr (cyclope.frec.bull.fr [129.183.4.9]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id A05B51A193A; Wed, 19 Nov 2008 21:44:25 +0100 (CET) Received: from localhost.localdomain (frecb000701.frec.bull.fr [129.183.101.72]) by cyclope.frec.bull.fr (Postfix) with ESMTP id AE08327291; Wed, 19 Nov 2008 21:44:23 +0100 (CET) Message-Id: <20081119204141.938837793@theryb.frec.bull.fr> References: <20081119204128.826163131@theryb.frec.bull.fr> User-Agent: quilt/0.46-1 Date: Wed, 19 Nov 2008 21:41:38 +0100 From: Benjamin Thery To: Dave Miller Cc: netdev , Benjamin Thery Subject: [PATCH] ipv6: use seq_release_private for ip6mr.c /proc entries X-Virus-Scanned: by amavisd-new at frec.bull.fr Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif are opened with seq_open_private(), thus seq_release_private() should be used to release them. Should fix a small memory leak. Benjamin Signed-off-by: Benjamin Thery --- net/ipv6/ip6mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: net-2.6/net/ipv6/ip6mr.c =================================================================== --- net-2.6.orig/net/ipv6/ip6mr.c +++ net-2.6/net/ipv6/ip6mr.c @@ -224,7 +224,7 @@ static struct file_operations ip6mr_vif_ .open = ip6mr_vif_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = seq_release_private, }; static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos) @@ -338,7 +338,7 @@ static struct file_operations ip6mr_mfc_ .open = ipmr_mfc_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = seq_release_private, }; #endif