Skip to contentSkip to conversation

Fix for memleak in Perle Specialix driver

PATCH Oleg Drokin 1 participant 1 message Apr 22, 2003 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

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 =====

drivers/char/rio/rioboot.c +1 -0
@@ -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;