bb01879ebe
Because vmem_free() was implemented as a macro using the ',' operator to evaluate both arguments and we performed the free before evaluating size we would deference the free'd pointer. To resolve the problem we just invert the ordering and evaluate size first just as if it was evaluated by the caller when being passed to this function. This ensure that if the caller is doing something reckless like performing an assignment as part of the size argument we still perform it and it simply doesn't get removed by the macro. Oh course nobody should be doing this sort of thing, but just in case. |
||
---|---|---|
.. | ||
asm | ||
fs | ||
linux | ||
rpc | ||
sharefs | ||
sys | ||
util | ||
vm | ||
Makefile.am | ||
Makefile.in | ||
spl-ctl.h | ||
spl-device.h | ||
splat-ctl.h | ||
strings.h | ||
unistd.h |