mesh: Fix stray pointer dereferencing on deinit procedure