From 24093bef78e1e4ea5d541716ebba63e8d4e15c58 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 1 Feb 2011 14:24:30 -0500 Subject: mount.cifs: fix possible use of uninitialized variable It's possible to "goto return_i" in this function at several points before line_buf is set. At that point, the NULL pointer check won't work correctly and we can end up with a SIGSEGV. Signed-off-by: Jeff Layton --- mount.cifs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mount.cifs.c') diff --git a/mount.cifs.c b/mount.cifs.c index 5f29761..3a2b539 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -636,7 +636,7 @@ parsing_err: static int open_cred_file(char *file_name, struct parsed_mount_info *parsed_info) { - char *line_buf; + char *line_buf = NULL; char *temp_val = NULL; FILE *fs = NULL; int i; -- cgit v1.2.3