[PATCH] wmp/tests: Fix a minor leak on error path (Coverity)