lkml.org 
[lkml]   [2001]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] zr36120.c
I found this error using xgcc with metal as an error checker.  It seems to
be a simple case of not freeing allocatd memory on an error path.
-john martin


--- drivers/media/video/zr36120.c.orig Fri Mar 2 11:12:10 2001
+++ drivers/media/video/zr36120.c Sat May 19 15:31:03 2001
@@ -1195,7 +1195,10 @@
if (vcp==NULL)
return -ENOMEM;
if (vw.clipcount && copy_from_user(vcp,vw.clips,sizeof(struct video_clip)*vw.clipcount))
+ {
+ vfree(vcp);
return -EFAULT;
+ }

on = ztv->running;
if (on)
-
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 12:54    [W:0.028 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site