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 > EXT3 Users

 
 
LinkBack Thread Tools
 
Old 02-25-2009, 08:12 PM
Joel Granados
 
Default PATCH : pyblock: Add missing DECREF and fix error handling in pydmraid_raidset_get_map()

looks ok.
On Wed, Feb 25, 2009 at 08:17:06PM +0100, Hans de Goede wrote:
> pydmraid_raidset_get_map() was missing a DECREF for the imported module and
> would return a non NULL value in case of error when the __init__ call failed.
> ---
> dmraid.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/dmraid.c b/dmraid.c
> index 51d4ad6..23e1bbc 100644
> --- a/dmraid.c
> +++ b/dmraid.c
> @@ -877,12 +877,13 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
>
> iret = PyObject_CallMethod(map, "__init__", "sO", rs->name, table);
> if (!iret) {
> - Py_DECREF(map);
> + Py_CLEAR(map);
> goto out;
> }
>
> out:
> Py_XDECREF(iret);
> + Py_XDECREF(m);
> Py_XDECREF(table);
> if (!map && !PyErr_Occurred()) {
> if (errno != 0)
> --
> 1.6.1.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
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 06:51 AM.

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