Private
Public Access
2
0

gpio.c: Add fix for dereferencing of a null pointer

Signed-off-by: Cosmin Popescu <gabrielcosmin.popescu@gmail.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Cosmin Popescu
2018-12-20 16:02:42 +02:00
committed by Mihai Tudor Panu
parent 5169021afd
commit 9fe2883e6a

View File

@@ -114,7 +114,7 @@ mraa_gpio_init_internal(mraa_adv_func_t* func_table, int pin)
dev->isr_thread_terminating = 0;
dev->phy_pin = -1;
if (!plat->chardev_capable) {
if ((plat != NULL) && (!plat->chardev_capable)) {
char bu[MAX_SIZE];
int length;