lkml.org 
[lkml]   [2003]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.5] memleak in fs/nfs/inode.c::nfs_get_sb()
Hello!

There is trivial memleak on error exit path in nfs get_sb function.
See the patch.
Found with the help of smatch + enhanced unfree script.

Bye,
Oleg

===== fs/nfs/inode.c 1.72 vs edited =====
--- 1.72/fs/nfs/inode.c Thu Feb 13 15:57:46 2003
+++ edited/fs/nfs/inode.c Tue Mar 11 18:03:07 2003
@@ -1231,6 +1231,7 @@

if (root->size > sizeof(root->data)) {
printk("nfs_get_sb: invalid root filehandle\n");
+ kfree(server);
return ERR_PTR(-EINVAL);
}
/* We now require that the mount process passes the remote address */
-
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/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.022 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site