core,w32: Fix minor potential memleak