mraa.c: fclose on NULL fp can segfault on some platforms
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -71,10 +71,10 @@ mraa_init()
|
||||
} else {
|
||||
platform_type = MRAA_INTEL_GALILEO_GEN1;
|
||||
}
|
||||
free(line);
|
||||
}
|
||||
fclose(fh);
|
||||
}
|
||||
free(line);
|
||||
fclose(fh);
|
||||
|
||||
advance_func = (mraa_adv_func_t*) malloc(sizeof(mraa_adv_func_t));
|
||||
memset(advance_func, 0, sizeof(mraa_adv_func_t));
|
||||
|
||||
Reference in New Issue
Block a user