login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
14
Re: Don't leak 'listeners' in netlink_kernel_create()
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Eric W. Biederman <ebiederm@...>
To: Jesper Juhl <jesper.juhl@...>
Cc: <netdev@...>, Linux Kernel Mailing List <linux-kernel@...>, Alan Cox <alan@...>, Alexey Kuznetsov <kuznet@...>, David Miller <davem@...>
Subject:
Re: Don't leak 'listeners' in netlink_kernel_create()
Date: Sunday, October 14, 2007 - 6:30 pm
Jesper Juhl <jesper.juhl@gmail.com> writes:
quoted text
> From: Jesper Juhl <jesper.juhl@gmail.com> > Subject: Don't leak 'listeners' in netlink_kernel_create() > > The Coverity checker spotted that we'll leak the storage allocated > to 'listeners' in netlink_kernel_create() when the > if (!nl_table[unit].registered) > check is false. > > This patch avoids the leak. > > > Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
This patch appears trivially correct to me. Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
quoted text
> --- > > af_netlink.c | 2 ++ > 1 file changed, 2 insertions(+) > > --- linux-2.6/net/netlink/af_netlink.c~ 2007-10-14 23:29:50.000000000 +0200 > +++ linux-2.6/net/netlink/af_netlink.c 2007-10-14 23:29:50.000000000 +0200 > @@ -1378,6 +1378,8 @@ netlink_kernel_create(struct net *net, i > nl_table[unit].cb_mutex = cb_mutex; > nl_table[unit].module = module; > nl_table[unit].registered = 1; > + } else { > + kfree(listeners); > } > netlink_table_ungrab(); >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: Don't leak 'listeners' in netlink_kernel_create()
, Eric W. Biederman
, (Sun Oct 14, 6:30 pm)
Re: Don't leak 'listeners' in netlink_kernel_create()
, David Miller
, (Mon Oct 15, 4:39 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Tejun Heo
[PATCH 2/5] sysfs: simplify sysfs_rename_dir()
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Mark Weber
hdparm standby timeout not working for WD raptors?
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Hugh Dickins
Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
760 guests
online.
Online users
creativewebs279
Syndicate