WMaker: fix memory leak in workspace switching (Coverity #50126)