30 lines
787 B
Diff
30 lines
787 B
Diff
From c46e864f40ce35f0b67543990b46dc0731121f9d Mon Sep 17 00:00:00 2001
|
|
From: Feng Ni <fengni@huawei.com>
|
|
Date: Thu, 25 Jul 2019 20:03:22 +0800
|
|
Subject: [PATCH] conf: use virDomainDeviceDefFree free dev
|
|
|
|
In function virDomainDeviceDefParse, we shoud use virDomainDeviceDefFree
|
|
free data structure avoid potential memory leak.
|
|
|
|
Signed-off-by: Feng Ni <fengni@huawei.com>
|
|
---
|
|
src/conf/domain_conf.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
index 3323c9a..ac9bdc0 100644
|
|
--- a/src/conf/domain_conf.c
|
|
+++ b/src/conf/domain_conf.c
|
|
@@ -16423,7 +16423,7 @@ virDomainDeviceDefParse(const char *xmlStr,
|
|
return dev;
|
|
|
|
error:
|
|
- VIR_FREE(dev);
|
|
+ virDomainDeviceDefFree(dev);
|
|
goto cleanup;
|
|
}
|
|
|
|
--
|
|
2.19.1
|
|
|