[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Fix a PyList usage mistake



From: Guan Qiang <hzguanqiang corp netease com>

Fix PyList usage mistake in Function libvirt_lxc_virDomainLxcOpenNamespace.

https://bugzilla.redhat.com/show_bug.cgi?id=1002383
---
 python/libvirt-lxc-override.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/libvirt-lxc-override.c b/python/libvirt-lxc-override.c
index 73685df..fa7e963 100644
--- a/python/libvirt-lxc-override.c
+++ b/python/libvirt-lxc-override.c
@@ -80,7 +80,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
     if (c_retval < 0)
         return VIR_PY_NONE;
 
-    py_retval = PyList_New(c_retval);
+    py_retval = PyList_New(0);
     for (i = 0; i < c_retval; i++) {
         PyObject *item = NULL;
 
-- 
1.7.10.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]