Fix a double free
Fix warning
Re-enable buffer for each read in order to be tolerant to suspend.