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
This commit is contained in:
parent
6c6ff43fbe
commit
1f039bded4
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user