From 59ab125f7e1d72b73bc2400aa2a4665d698ed1ff Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Tue, 1 Sep 2015 14:54:38 +0100 Subject: [PATCH] gpio.c: fix segfault on isrExit in python because of double Py_DECREF Py_DECREF is not required here as no interpreter is clever enough to handle this reference causing a double free on isrExit(). Closes #265 Signed-off-by: Brendan Le Foll --- src/gpio/gpio.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gpio/gpio.c b/src/gpio/gpio.c index 58ccfe6..eb31a96 100644 --- a/src/gpio/gpio.c +++ b/src/gpio/gpio.c @@ -320,11 +320,6 @@ mraa_gpio_isr_exit(mraa_gpio_context dev) } } -#ifdef SWIGPYTHON - // Dereference our Python call back function - Py_DECREF(dev->isr); -#endif - // assume our thread will exit either way we just lost it's handle dev->thread_id = 0; dev->isr_value_fp = -1;