Private
Public Access
2
0

coverity: Fix issues found by coverity scan

* Fix a few resource leaks in error conditions
* Makes strtol() calls safer in pwm module
* Make sure buffer is terminated after read() in aio

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-10-03 22:50:18 +01:00
parent 4e5ec299ed
commit 2b5e38b40c
6 changed files with 42 additions and 11 deletions

View File

@@ -153,9 +153,10 @@ mraa_intel_galileo_gen2_gpio_mode_replace(mraa_gpio_context dev, gpio_mode_t mod
}
if (value != -1) {
sta = mraa_gpio_dir(pullup_e, MRAA_GPIO_OUT);
sta = mraa_gpio_write(pullup_e, value);
sta += mraa_gpio_write(pullup_e, value);
if (sta != MRAA_SUCCESS) {
syslog(LOG_ERR, "Galileo Gen 2: Error Setting pullup");
close(drive);
return sta;
}
}