Fix soap memory leaks (ported from wl500g)