Ensure the buffer is freed on all exceptional circumstances for incoming messages