bindings: python: decref the chip object in gpiod_Module_find_line()
authorBartosz Golaszewski <bartekgola@gmail.com>
Sat, 12 May 2018 12:30:44 +0000 (14:30 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Sat, 12 May 2018 12:51:28 +0000 (14:51 +0200)
commitf36a27f1cc25167c1f03fea8f6f431e10375c043
treeed828edf0c2b2b034a771bfbdaee2ffa0c3206e6
parentac48e6c3c456eba7c17299c8bf1408ace3d46dda
bindings: python: decref the chip object in gpiod_Module_find_line()

When returning back to the interpreter from gpiod_Module_find_line(),
there's only one chip object reference holder, but we set the refcount
to 2 (as if the chip object existed separately in the interpreter).

Fix it by decreasing the chip's refcount by one before returning the
line object.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
bindings/python/gpiodmodule.c