Memory allocated by the call to buffer_get_string_ret may be lost on one of the two error paths.
Created attachment 1025 [details] fix I'll commit this one soon too.
fix applied and will be in 4.3, thanks for the report.
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.