Coverity reports that we leak storage that 'buf' points to because we
are reassigning the variable, so lets free the previous strbuf so we
Depends on D8769
Maybe instead of freeing buf and allocating it again in the next line, you can remove lines 633 and 635. The buffer has already been reset, so it is ready to continue working on it.