[Devel] [trivial PATCH] cr: fd can be used uninitialized

Serge E. Hallyn serue at us.ibm.com
Tue Mar 24 13:54:25 PDT 2009


Trivial fix.

Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
---
 checkpoint/rstr_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/checkpoint/rstr_file.c b/checkpoint/rstr_file.c
index de260dc..c9d75e5 100644
--- a/checkpoint/rstr_file.c
+++ b/checkpoint/rstr_file.c
@@ -236,7 +236,7 @@ int cr_read_file(struct cr_ctx *ctx, int objref)
 {
 	struct cr_hdr_file *hh;
 	struct file *file;
-	int fd, ret;
+	int fd = -EINVAL, ret;
 
 	hh = cr_hbuf_get(ctx, sizeof(*hh));
 	if (!hh)
-- 
1.6.1

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list