From f8752b7a09813d6034ba37939710769eeba28848 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Thu, 30 Jul 2015 09:58:25 +0100 Subject: [PATCH] beaglebone.c: remove freeing of NULL var Signed-off-by: Brendan Le Foll --- src/arm/beaglebone.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/arm/beaglebone.c b/src/arm/beaglebone.c index 7723430..379337d 100644 --- a/src/arm/beaglebone.c +++ b/src/arm/beaglebone.c @@ -194,7 +194,6 @@ mraa_beaglebone_uart_init_pre(int index) FILE* fh; fh = fopen(capepath, "w"); if (fh == NULL) { - free(capepath); syslog(LOG_ERR, "uart: Failed to open %s for writing, check access rights for user", capepath); return ret; } @@ -245,7 +244,6 @@ mraa_beaglebone_spi_init_pre(int index) FILE* fh; fh = fopen(capepath, "w"); if (fh == NULL) { - free(capepath); syslog(LOG_ERR, "spi: Failed to open %s for writing, check access rights for user", capepath); return ret; } @@ -284,7 +282,6 @@ mraa_beaglebone_i2c_init_pre(unsigned int bus) FILE* fh; fh = fopen(capepath, "w"); if (fh == NULL) { - free(capepath); syslog(LOG_ERR, "i2c: Failed to open %s for writing, check access rights for user", capepath); return ret; } @@ -327,7 +324,6 @@ mraa_beaglebone_pwm_init_replace(int pin) } fh = fopen(capepath, "w"); if (fh == NULL) { - free(capepath); syslog(LOG_ERR, "pwm: Failed to open %s for writing, check access rights for user", capepath); return NULL; }