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

Re: PATCH: pyparted: Do not keep a borrowed refence without INCREF-ing it



> In _ped_Disk_init we store a borrowed reference in self->dev (through
> PyArg_ParseTuple()). We INCREF this on success at the end. But we keep it
> without INCREF-ing it in an error path. This path clears the borrowed reference
> in the error path. This fixes various cases of python crashing when having
> an invalid partition table.

Seems likely that we're doing this same thing in several other places,
too.  Did you go looking for those, or is that something I need to do?
Other than that, looks fine.

- Chris


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