Skip to contentSkip to conversation

[2.5] Memleak in fs/ufs/util.c

PATCH Oleg Drokin 1 participant 1 message Mar 11, 2003

lore
Share & tools
lore
#0 lore raw

Hello!

There is trivial memleak on error exit path in fs/ufs/util.c::_ubh_bread_()
See the patch attached.

Bye,
Oleg

===== fs/ufs/util.c 1.9 vs edited =====

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