diff options
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r-- | Modules/selectmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index de80b82..81fedd5 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -49,10 +49,12 @@ list2set(list, set, fd2obj) v = getintvalue(o); } else if ( (filenomethod = getattr(o, "fileno")) != NULL ) { fno = call_object(filenomethod, NULL); + DECREF(filenomethod); if ( fno == NULL ) return -1; if ( !is_intobject(fno) ) { err_badarg(); + DECREF(fno); return -1; } v = getintvalue(fno); |