PATCH: pyparted: Remove a couple of unneeded INCREF's from pydisk.c

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

 



Remove a couple of unneeded INCREF's from pydisk.c, stopping us from leaking
a couple of python objects
---
 src/pydisk.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/pydisk.c b/src/pydisk.c
index 1b112f3..c1c3228 100644
--- a/src/pydisk.c
+++ b/src/pydisk.c
@@ -151,8 +151,6 @@ int _ped_Partition_init(_ped_Partition *self, PyObject *args, PyObject *kwds) {
      */
     Py_CLEAR(self->geom);
     self->geom = (PyObject *) PedGeometry2_ped_Geometry(&(part->geom));
-    Py_INCREF(self->geom);
-
     self->ped_partition = part;

     return 0;
@@ -281,8 +279,6 @@ int _ped_Disk_init(_ped_Disk *self, PyObject *args, PyObject *kwds) {
     Py_INCREF(self->dev);

self->type = (PyObject *) PedDiskType2_ped_DiskType((PedDiskType *) disk->type);
-    Py_INCREF(self->type);
-
     self->ped_disk = disk;

     return 0;
--
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux