[libvirt] [PATCH RESEND] phyp: Fix memory leak in phypUUIDTable_Push

@remote_file, allocated by virAsprintf, was not freed and leaked. Signed-off-by: Zhipeng Lu <lu.zhipeng@zte.com.cn> --- src/phyp/phyp_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 9121581..662e2f7 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -568,6 +568,7 @@ phypUUIDTable_Push(virConnectPtr conn) ret = 0; cleanup: + VIR_FREE(remote_file); if (channel) { libssh2_channel_send_eof(channel); libssh2_channel_wait_eof(channel); -- 1.8.3.1

On 07/19/2017 02:02 AM, ZhiPeng Lu wrote:
@remote_file, allocated by virAsprintf, was not freed and leaked.
Signed-off-by: Zhipeng Lu <lu.zhipeng@zte.com.cn> --- src/phyp/phyp_driver.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 9121581..662e2f7 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -568,6 +568,7 @@ phypUUIDTable_Push(virConnectPtr conn) ret = 0;
cleanup: + VIR_FREE(remote_file); if (channel) { libssh2_channel_send_eof(channel); libssh2_channel_wait_eof(channel);
ACKed and pushed. Michal
participants (2)
-
Michal Privoznik
-
ZhiPeng Lu