From 2fcf89a2077d3ddf203b73d72985aa68c6402693 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 14 May 2010 15:30:07 -0400 Subject: mount.cifs: unitialized variable in cred parsing error path Signed-off-by: Steve French Signed-off-by: Jeff Layton --- mount.cifs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mount.cifs.c') diff --git a/mount.cifs.c b/mount.cifs.c index 5c10085..6a47b14 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -606,7 +606,7 @@ static int open_cred_file(char *file_name, struct parsed_mount_info *parsed_info) { char *line_buf; - char *temp_val; + char *temp_val = NULL; FILE *fs = NULL; int i; const int line_buf_size = 4096; @@ -669,9 +669,9 @@ static int open_cred_file(char *file_name, break; case CRED_UNPARSEABLE: if (parsed_info->verboseflag) - fprintf(stderr, - "Credential formatted incorrectly: %s", - temp_val); + fprintf(stderr, "Credential formatted " + "incorrectly: %s\n", + temp_val ? temp_val : "(null)"); break; } } -- cgit v1.2.3