From cf8ae27bab717621f1edf8ab6ae3dd89da4d8d4f Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano <gscrivan@redhat.com> Date: Tue, 5 May 2015 16:37:24 +0200 Subject: [PATCH] glnx-fdio: always initialize buf It can be used without initialization if condition causing a "goto error" fails before buf is initialized. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> --- glnx-fdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glnx-fdio.c b/glnx-fdio.c index 517f1e541..7db33c4c6 100644 --- a/glnx-fdio.c +++ b/glnx-fdio.c @@ -211,7 +211,7 @@ glnx_file_get_contents_utf8_at (int dfd, { gboolean success = FALSE; glnx_fd_close int fd = -1; - char *buf; + char *buf = NULL; gsize len; dfd = glnx_dirfd_canonicalize (dfd); -- GitLab