[PATCH 11/14] Cleanup: check error return values of buffer handling