diff options
author | kib <kib@FreeBSD.org> | 2013-08-10 20:54:15 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-08-10 20:54:15 +0000 |
commit | fc8a240c932befded2fb41a38bf6edddb8cae527 (patch) | |
tree | 727399926d14900b659b02b7af880b7448658a85 | |
parent | e3e1c5db73b1252932f9d90ce2148d1c8eff1265 (diff) | |
download | FreeBSD-src-fc8a240c932befded2fb41a38bf6edddb8cae527.zip FreeBSD-src-fc8a240c932befded2fb41a38bf6edddb8cae527.tar.gz |
Match malloc(9) calls with free(9), not contigfree(9). Also remove
unneeded checks for NULL, free(9) can handle NULL pointers on its own,
and the regions were allocated with M_WAITOK flag as well.
Reported and tested by: Larry Rosenman <ler@lerctr.org>
MFC after: 1 week
-rw-r--r-- | sys/dev/cpuctl/cpuctl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c index 742ef0db..4e5abb2 100644 --- a/sys/dev/cpuctl/cpuctl.c +++ b/sys/dev/cpuctl/cpuctl.c @@ -346,8 +346,7 @@ update_intel(int cpu, cpuctl_update_args_t *args, struct thread *td) else ret = EEXIST; fail: - if (ptr != NULL) - contigfree(ptr, args->size, M_CPUCTL); + free(ptr, M_CPUCTL); return (ret); } @@ -476,8 +475,7 @@ update_via(int cpu, cpuctl_update_args_t *args, struct thread *td) else ret = 0; fail: - if (ptr != NULL) - contigfree(ptr, args->size, M_CPUCTL); + free(ptr, M_CPUCTL); return (ret); } |