[PATCH] Fix a PyList usage mistake

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

 



From: Guan Qiang <hzguanqiang@xxxxxxxxxxxxxxxx>

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]