More do not keep a borrowed refence without INCREF-ing it changes.
---
src/pyconstraint.c | 4 ++++
src/pydisk.c | 5 +++--
src/pygeom.c | 1 +
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/pyconstraint.c b/src/pyconstraint.c
index 813532c..3fb76a7 100644
--- a/src/pyconstraint.c
+++ b/src/pyconstraint.c
@@ -150,6 +150,10 @@ int _ped_Constraint_init(_ped_Constraint *self, PyObject
*args,
ped_alignment_destroy(start_align);
ped_alignment_destroy(end_align);
+ self->start_align = NULL;
+ self->end_align = NULL;
+ self->start_range = NULL;
+ self->end_range = NULL;
return -3;
}
diff --git a/src/pydisk.c b/src/pydisk.c
index 19f7724..3c1a692 100644
--- a/src/pydisk.c
+++ b/src/pydisk.c
@@ -98,7 +98,7 @@ int _ped_Partition_init(_ped_Partition *self, PyObject *args,
PyObject *kwds) {
&_ped_Disk_Type_obj, &self->disk,
&self->type, &start, &end,
&_ped_FileSystemType_Type_obj, &self->fs_type)) {
- self->disk = self->geom = self->fs_type = NULL;
+ self->disk = self->fs_type = NULL;
return -1;
}
} else {
@@ -106,7 +106,7 @@ int _ped_Partition_init(_ped_Partition *self, PyObject
*args, PyObject *kwds) {
&_ped_Disk_Type_obj, &self->disk,
&self->type, &start, &end,
&_ped_FileSystemType_Type_obj,
&self->fs_type)) {
- self->disk = self->geom = self->fs_type = NULL;
+ self->disk = self->fs_type = NULL;
return -1;
}
}
@@ -132,6 +132,7 @@ int _ped_Partition_init(_ped_Partition *self, PyObject
*args, PyObject *kwds) {
PyErr_Format(PartitionException, "Could not create new partition
on device %s", disk->dev->path);
}
+ self->disk = self->fs_type = NULL;
return -3;
}
diff --git a/src/pygeom.c b/src/pygeom.c
index 491af4f..34cb54c 100644
--- a/src/pygeom.c
+++ b/src/pygeom.c
@@ -100,6 +100,7 @@ int _ped_Geometry_init(_ped_Geometry *self, PyObject *args,
PyObject *kwds) {
PyErr_SetString(CreateException, "Could not create new geometry");
}
+ self->dev = NULL;
return -3;
}
--
1.6.1.3
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list