summaryrefslogtreecommitdiff
path: root/mount.cifs.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2010-05-14 15:30:07 -0400
committerJeff Layton <jlayton@samba.org>2010-05-14 15:30:07 -0400
commit2fcf89a2077d3ddf203b73d72985aa68c6402693 (patch)
tree27588fd4b6b6a7715b1333ef34fdbdba0c90fa25 /mount.cifs.c
parent3f794556e3ec633dc6250ce12f76d6ba79c192a9 (diff)
downloadcifs-utils-2fcf89a2077d3ddf203b73d72985aa68c6402693.tar.gz
cifs-utils-2fcf89a2077d3ddf203b73d72985aa68c6402693.tar.bz2
cifs-utils-2fcf89a2077d3ddf203b73d72985aa68c6402693.zip
mount.cifs: unitialized variable in cred parsing error path
Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r--mount.cifs.c8
1 files changed, 4 insertions, 4 deletions
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;
}
}