Fix possible memory leak in virsh-domain-monitor.c in cmdDomblklist
In a "for" loop there are created two new strings and they may not
be freed if a "target" string cannot be obtained. We have to free
the two created strings to prevent the memory leak.
This has been found by coverity.
John also pointed out that we should somehow care about the "type"
and "device" and Osier agreed to exit with error message if one of
them is set to NULL.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Showing
想要评论请 注册 或 登录