FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Desktop

 
 
LinkBack Thread Tools
 
Old 02-25-2009, 06:16 PM
Hans de Goede
 
Default PATCH : pyblock: Fix map->dev refcounting

Fix map->dev refcounting.
---
dm.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dm.c b/dm.c
index cd5110b..42f70a8 100644
--- a/dm.c
+++ b/dm.c
@@ -948,16 +948,14 @@ pydm_map_init_method(PyObject *self, PyObject *args,
PyObject *kwds)

&PydmDevice_Type, &dev))
return -1;

- Py_XINCREF(dev);
-
map->name = strdup(name);

if (uuid)
map->uuid = strdup(uuid);
- if (dev)
+ if (dev) {
+ Py_INCREF(dev);
map->dev = (PyObject *)dev;
-
- Py_XDECREF(dev);
+ }

return pydm_map_create(map, table);
}
@@ -1262,7 +1260,6 @@ pydm_map_get(PyObject *self, void *data)
if (!dev) {
dev = PydmDevice_FromMajorMinor(0,0);
map->dev = dev;
- Py_INCREF(dev);
}
Py_INCREF(dev);
return dev;
--
1.6.1.3

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

Thread Tools




All times are GMT. The time now is 09:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org