Skip to contentSkip to conversation

[2.4] ufs memleak

PATCH Oleg Drokin 1 participant 1 message Mar 9, 2003

lore
Share & tools
lore
#0 lore raw

Hello!

Seems there is ufs memleak in 2.4 code. See the patch attached. Found with help of smatch + enchanced unfree script.

Bye,
Oleg
===== fs/ufs/util.c 1.5 vs edited =====

fs/ufs/util.c +1 -0
@@ -47,6 +47,7 @@
 failed:
 	for (j = 0; j < i; j++)
 		brelse (ubh->bh[j]);
+	kfree(ubh);
 	return NULL;
 }