fix some more leaks identified by the leaks tool
note that the free_svalue leak may not be an actual leak.