Phonet: fix potential use-after-free in pep_sock_close()