⬢ DragonFlyBSD Kernel Audit
DF-3166 / fix.diff
← back to finding ↓ download raw
--- a/sys/vfs/udf/udf_vfsops.c
+++ b/sys/vfs/udf/udf_vfsops.c
@@ -390,9 +390,12 @@ udf_mountfs(struct vnode *devvp, struct mount *mp)
 
 bail:
 	if (udfmp != NULL) {
+		if (udfmp->s_table != NULL)
+			kfree(udfmp->s_table, M_UDFMOUNT);
 		kfree(udfmp, M_UDFMOUNT);
 	}
 	if (bp != NULL)
 		brelse(bp);
@@ -535,9 +538,11 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp)
 	if ((error = udf_allocv(mp, &vp))) {
 		kprintf("Error from udf_allocv\n");
+		if (unode->fentry != NULL)
+			kfree(unode->fentry, M_UDFFENTRY);
 		kfree(unode, M_UDFNODE);
 		return(error);
 	}