Don't bail if there was no error, buf could have been NULL on entry.