[PATCH] lib: fwts_klog: remove redundant free()
Colin King
colin.king at canonical.com
Thu Mar 8 12:48:12 UTC 2012
From: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/lib/src/fwts_klog.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/lib/src/fwts_klog.c b/src/lib/src/fwts_klog.c
index 39e8183..7b7fb41 100644
--- a/src/lib/src/fwts_klog.c
+++ b/src/lib/src/fwts_klog.c
@@ -66,10 +66,8 @@ fwts_list *fwts_klog_read(void)
if ((len = klogctl(10, NULL, 0)) < 0)
return NULL;
- if ((buffer = calloc(1, len)) == NULL) {
- free(buffer);
+ if ((buffer = calloc(1, len)) == NULL)
return NULL;
- }
if (klogctl(3, buffer, len) < 0) {
free(buffer);
--
1.7.9
More information about the fwts-devel
mailing list