collector: don't leak dmesg buffer on error

While at it rename the bug from log to logbuf.

Reported by Coverity.