Fix memory leaks in local push