[PATCH] lib: fwts_pipeio: set *list to NULL on fwts_pipe_read error

Colin King colin.king at canonical.com
Mon May 2 19:39:51 UTC 2016


From: Colin Ian King <colin.king at canonical.com>

If fwts_pipe_read fails then *list should be set to NULL and
not list.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/lib/src/fwts_pipeio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c
index 368347c..859e63e 100644
--- a/src/lib/src/fwts_pipeio.c
+++ b/src/lib/src/fwts_pipeio.c
@@ -287,7 +287,7 @@ int fwts_pipe_exec(const char *command, fwts_list **list, int *status)
 		*list = fwts_list_from_text(text);
 		free(text);
 	} else {
-		list = NULL;
+		*list = NULL;
 	}
 
 	*status = fwts_pipe_close(fd, pid);
-- 
2.7.4




More information about the fwts-devel mailing list