DragonFlyBSD Kernel Audit
DF-0144 / 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
@@ -343,6 +343,8 @@
 		return EOPNOTSUPP;
 	path = vqa->path;
 	error = copyin(vqa->pref, &pref, sizeof(pref));
+	if (error)
+		return (error);
 	error = prop_dictionary_copyin(&pref, &dict);
 	if (error)
 		return(error);