>>> Ignoring storage allocated by "reralloc_size(buf->mem_ctx, buf->data, buf->size)" leaks it.
Reviewed-by: Thomas Helland<thomashelland90@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
if (buf->size != buf->capacity) {
if (buf->size) {
if (buf->mem_ctx) {
- reralloc_size(buf->mem_ctx, buf->data, buf->size);
+ buf->data = reralloc_size(buf->mem_ctx, buf->data, buf->size);
} else {
buf->data = realloc(buf->data, buf->size);
}