mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-28 18:51:53 +01:00
kernwin.i: fixed a reference leak
This commit is contained in:
parent
9f4df6991f
commit
56f6dc02be
@ -196,16 +196,17 @@ uint32 choose_choose(void *self,
|
||||
int width)
|
||||
{
|
||||
PyObject *pytitle;
|
||||
|
||||
char deftitle[] = "Choose";
|
||||
char *title = NULL;
|
||||
|
||||
const char *title;
|
||||
if ((pytitle = PyObject_GetAttrString((PyObject *)self, "title")))
|
||||
{
|
||||
title = PyString_AsString(pytitle);
|
||||
}
|
||||
|
||||
return choose(
|
||||
else
|
||||
{
|
||||
title = "Choose";
|
||||
pytitle = NULL;
|
||||
}
|
||||
int r = choose(
|
||||
flags,
|
||||
x0, y0,
|
||||
x1, y1,
|
||||
@ -213,7 +214,7 @@ uint32 choose_choose(void *self,
|
||||
width,
|
||||
&choose_sizer,
|
||||
&choose_getl,
|
||||
title ? title : deftitle,
|
||||
title,
|
||||
1,
|
||||
1,
|
||||
NULL, /* del */
|
||||
@ -224,7 +225,9 @@ uint32 choose_choose(void *self,
|
||||
NULL, /* destroy */
|
||||
NULL, /* popup_names */
|
||||
NULL /* get_icon */
|
||||
);
|
||||
);
|
||||
Py_XDECREF(pytitle);
|
||||
return r;
|
||||
}
|
||||
%}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user