Free the zval when getting metadata
Get rid of a broken connection properly