提交 e206946d 编写于 作者: W Wen Congyang

free tmp after unlinking it

We create a temporary file to save memory, and we will remove it after reading
memory to buffer. But we free the variable that contains the temporary filename
before we remove it. So we should free tmp after unlinking it.
上级 51434d3b
......@@ -5065,9 +5065,9 @@ endjob:
vm = NULL;
cleanup:
VIR_FREE(tmp);
VIR_FORCE_CLOSE(fd);
unlink (tmp);
VIR_FREE(tmp);
if (vm)
virDomainObjUnlock(vm);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册