Fix for memleak in Perle Specialix driver

From: Oleg Drokin (green@linuxhacker.ru)
Date: Tue Apr 22 2003 - 15:08:15 EST


Hello!

   There is a memleak on error exit path in Perle Specialix driver.
   The problem is present in both 2.4 and 2.5, the patch is trivial and
   applies to both trees.
   Please consider applying.

Bye,
    Oleg

===== drivers/char/rio/rioboot.c 1.3 vs edited =====
--- 1.3/drivers/char/rio/rioboot.c Tue Feb 5 10:42:04 2002
+++ edited/drivers/char/rio/rioboot.c Tue Apr 22 23:50:56 2003
@@ -328,6 +328,7 @@
 
                         if ( copyin((int)rbp->DataP,DownCode,rbp->Count)==COPYFAIL ) {
                                 rio_dprintk (RIO_DEBUG_BOOT, "Bad copyin of host data\n");
+ sysfree( DownCode, rbp->Count );
                                 p->RIOError.Error = COPYIN_FAILED;
                                 func_exit ();
                                 return EFAULT;
-
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/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:34 EST