Fix CID 13335 - Resource leak overwriting buf