diff mbox

libflash: Ensure temporary buffer is freed

Message ID 1425440184-32398-1-git-send-email-joel@jms.id.au
State Accepted
Headers show

Commit Message

Joel Stanley March 4, 2015, 3:36 a.m. UTC
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 libflash/libflash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libflash/libflash.c b/libflash/libflash.c
index 8be73b2..2886fc7 100644
--- a/libflash/libflash.c
+++ b/libflash/libflash.c
@@ -174,7 +174,7 @@  int flash_read_corrected(struct flash_chip *c, uint32_t pos, void *buf,
 		pos += ECC_BUFFER_SIZE(copylen);
 	}
 
-	return 0;
+	rc = 0;
 
 err:
 	free(bufecc);