mraa:c Fix dereference of 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:
committed by
Mihai Tudor Panu
parent
89473e5ba4
commit
c821c19899
@@ -192,6 +192,8 @@ imraa_init()
|
|||||||
if (plat != NULL) {
|
if (plat != NULL) {
|
||||||
plat->platform_type = MRAA_NULL_PLATFORM;
|
plat->platform_type = MRAA_NULL_PLATFORM;
|
||||||
plat->platform_name = "Unknown platform";
|
plat->platform_name = "Unknown platform";
|
||||||
|
} else {
|
||||||
|
return MRAA_ERROR_NO_RESOURCES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user