Skip to contentSkip to conversation

[2.4] Memleak in Essential RoadRunner HIPPI board driver

PATCH Oleg Drokin 1 participant 1 message Mar 12, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

Hello!

There is memleak on error exit path. Seems there was some confusion in the mind of whoever added that zeroing statement.
The patch is trivial, 2.5 is not affected.
Found with help of smatch + enhanced unfree script

Bye,
Oleg

===== drivers/net/rrunner.c 1.6 vs edited =====

drivers/net/rrunner.c +0 -1
@@ -1216,7 +1216,6 @@
 
 	rrpriv->info = kmalloc(sizeof(struct rr_info), GFP_KERNEL);
 	if (!rrpriv->info){
-		rrpriv->rx_ctrl = NULL;
 		ecode = -ENOMEM;
 		goto error;
 	}