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 <brendan.le.foll@intel.com>
This commit is contained in:
@@ -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
|
// assume our thread will exit either way we just lost it's handle
|
||||||
dev->thread_id = 0;
|
dev->thread_id = 0;
|
||||||
dev->isr_value_fp = -1;
|
dev->isr_value_fp = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user