DragonFlyBSD Kernel Audit
DF-0146 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/kern/vfs_quota.c b/sys/kern/vfs_quota.c
--- a/sys/kern/vfs_quota.c
+++ b/sys/kern/vfs_quota.c
@@ -397,16 +397,21 @@
 		error = cmd_set_limit_gid(nch.mount, args);
 		goto done;
 	}
+	prop_object_release(pa_out);
+	prop_object_release(dict);
 	cache_put(&nch);
 	return EINVAL;
 
 done:
 	/* kernel to userland */
+	prop_object_release(dict);
 	dict = prop_dictionary_create();
 	error = prop_dictionary_set(dict, "returned data", pa_out);
+	prop_object_release(pa_out);
 
 	error = prop_dictionary_copyout(&pref, dict);
 	error = copyout(&pref, vqa->pref, sizeof(pref));
+	prop_object_release(dict);
 	cache_put(&nch);
 
 	return error;