Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Revert previous changes. They are wrong. The inte...
details: https://anonhg.NetBSD.org/src/rev/06d8b1c34954
branches: trunk
changeset: 356051:06d8b1c34954
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Tue Aug 29 12:48:50 2017 +0000
description:
Revert previous changes. They are wrong. The intended clean-up
is already being handled by the call to veriexec_file_free() in
the "out:" path.
diffstat:
sys/kern/kern_veriexec.c | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
diffs (56 lines):
diff -r c46986e4c248 -r 06d8b1c34954 sys/kern/kern_veriexec.c
--- a/sys/kern/kern_veriexec.c Tue Aug 29 10:23:12 2017 +0000
+++ b/sys/kern/kern_veriexec.c Tue Aug 29 12:48:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_veriexec.c,v 1.14 2017/08/29 10:23:12 pgoyette Exp $ */
+/* $NetBSD: kern_veriexec.c,v 1.15 2017/08/29 12:48:50 pgoyette Exp $ */
/*-
* Copyright (c) 2005, 2006 Elad Efrat <elad%NetBSD.org@localhost>
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.14 2017/08/29 10:23:12 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.15 2017/08/29 12:48:50 pgoyette Exp $");
#include "opt_veriexec.h"
@@ -1079,7 +1079,7 @@
log(LOG_ERR, "Veriexec: Invalid or unknown fingerprint type "
"`%s' for file `%s'.\n", fp_type, file);
error = EOPNOTSUPP;
- goto free_out;
+ goto out;
}
if (prop_data_size(prop_dictionary_get(dict, "fp")) !=
@@ -1087,7 +1087,7 @@
log(LOG_ERR, "Veriexec: Bad fingerprint length for `%s'.\n",
file);
error = EINVAL;
- goto free_out;
+ goto out;
}
vfe->fp = kmem_alloc(vfe->ops->hash_len, KM_SLEEP);
@@ -1156,19 +1156,8 @@
veriexec_bypass = 0;
unlock_out:
- if (error) {
- kmem_free(vfe->fp, vfe->ops->hash_len);
- if (vfe->filename != NULL)
- kmem_free(vfe->filename, vfe->filename_len);
- }
rw_exit(&veriexec_op_lock);
- free_out:
- if (error) {
- rw_destroy(&vfe->lock);
- kmem_free(vfe, sizeof(*vfe));
- }
-
out:
vrele(vp);
if (error)
Home |
Main Index |
Thread Index |
Old Index