lkml.org 
[lkml]   [2003]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [CHECKER] 32 Memory Leaks on Error Paths
* David Yu Chen (dychen@stanford.edu) wrote:
> [FILE: 2.6.0-test5/fs/afs/cell.c]
> START -->
> 58: cell = kmalloc(sizeof(afs_cell_t) + strlen(name) + 1,GFP_KERNEL);
> 59: if (!cell) {
<snip>
> 126: error:
> 127: up_write(&afs_cells_sem);
> 128: kfree(afs_cell_root);
> END -->

Yes, this looks like a bug/typo. Patch below. David, this look ok?

thanks,
-chris

===== fs/afs/cell.c 1.2 vs edited =====
--- 1.2/fs/afs/cell.c Tue Sep 9 03:21:38 2003
+++ edited/fs/afs/cell.c Tue Sep 23 11:57:26 2003
@@ -145,7 +145,7 @@
printk("kAFS: bad VL server IP address: '%s'\n",vllist);
error:
up_write(&afs_cells_sem);
- kfree(afs_cell_root);
+ kfree(cell);
return ret;
} /* end afs_cell_create() */

-
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:48    [W:0.238 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site