提交 d8bb71b6 编写于 作者: Z Zhang Haoyu 提交者: Kevin Wolf

qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard

When the Qcow2DiscardRegion is adjacent to another one referenced by "d",
free this Qcow2DiscardRegion metadata referenced by "p" after
it was removed from s->discards queue.
Signed-off-by: NZhang Haoyu <zhanghy@sangfor.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 5f77ef69
......@@ -524,6 +524,7 @@ found:
QTAILQ_REMOVE(&s->discards, p, next);
d->offset = MIN(d->offset, p->offset);
d->bytes += p->bytes;
g_free(p);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册