Fixed PHP-715: Crash when authenticating on a dead socket

free() data_buffer on failure inside the function
The caller only has to free() it on success (when its guaranteed to hold data)
Merge Pull Request #333 into 'next'

* pr/333:
  Fixed PHP-715: Crash when authenticating on a dead socket