qemuMonitorTextAttachDrive: avoid two leaks
* src/qemu/qemu_monitor_text.c (qemuMonitorTextAttachDrive): Most other failures in this function would "goto cleanup", but one mistakenly returned directly, skipping the cleanup and resulting in a leak. In addition, iterating the "try_command" loop would clobber, and thus leak, the "cmd" allocated on the first iteration, so be careful to free it in addition to "reply" beforehand.
Showing
想要评论请 注册 或 登录