![]() the fist problem is that qopen() might return nil and that kstrdup() will sleep, so we should try to avoid holding the mntalloc lock. so we move the kstrdup() and qopen() calls before the Mnt allocation, and properly recover the memory if we fail later. the second problem was that we error(Eshort) after we already created the Mnt when returnlen < sizeof(f.version). this check has to happen *before* we even attempt to allocate the Mnt structures. note that we only copy the version string once everything is in the clear, so the semantics of the user buffer not being modified in case of error is not changed. a little cleanup in muxclose(), getting rid of mntptfree()... |
||
---|---|---|
.. | ||
doc | ||
games/lib | ||
include | ||
lib | ||
man | ||
src |