mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 19:31:15 +03:00
dereferencing: Small fixes for deref errors.
Cleanup some dereferencing after free. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -30,6 +30,7 @@ gp2y0a_context gp2y0a_init(uint8_t pin, float a_ref){
|
||||
dev->pin = pin;
|
||||
dev->aio = mraa_aio_init(dev->pin);
|
||||
if(dev->aio == NULL){
|
||||
free(dev);
|
||||
return NULL;
|
||||
}
|
||||
dev->a_res = (1 << mraa_aio_get_bit(dev->aio));
|
||||
|
Reference in New Issue
Block a user