linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zr36120.c
@ 2001-05-27  2:25 John Martin
  2001-05-27 12:36 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: John Martin @ 2001-05-27  2:25 UTC (permalink / raw)
  To: linux-kernel, torvalds

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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] zr36120.c
  2001-05-27  2:25 [PATCH] zr36120.c John Martin
@ 2001-05-27 12:36 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2001-05-27 12:36 UTC (permalink / raw)
  To: John Martin; +Cc: linux-kernel, torvalds

> 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

Already fixed in -ac


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-27 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-27  2:25 [PATCH] zr36120.c John Martin
2001-05-27 12:36 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).