[lxc-devel] [lxc/master] parse: fix uninitialized value
2xsec on Github
lxc-bot at linuxcontainers.org
Fri Oct 19 02:54:49 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 400 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181019/7773a783/attachment.bin>
-------------- next part --------------
From 9c3f0f02f85d7f0dac98a64067e1bf2848b6ae2c Mon Sep 17 00:00:00 2001
From: 2xsec <dh48.jeong at samsung.com>
Date: Fri, 19 Oct 2018 11:51:51 +0900
Subject: [PATCH] parse: fix uninitialized value
Signed-off-by: 2xsec <dh48.jeong at samsung.com>
---
src/lxc/parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/parse.c b/src/lxc/parse.c
index ab9aab461..1c1ddaa2c 100644
--- a/src/lxc/parse.c
+++ b/src/lxc/parse.c
@@ -72,7 +72,7 @@ int lxc_strmunmap(void *addr, size_t length)
int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *data)
{
int saved_errno;
- ssize_t ret, bytes_sent;
+ ssize_t ret = -1, bytes_sent;
char *line;
int fd = -1, memfd = -1;
char *buf = NULL;
More information about the lxc-devel
mailing list