diff options
author | Jeff Layton <jlayton@samba.org> | 2011-02-01 14:24:30 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2011-02-01 14:24:30 -0500 |
commit | 24093bef78e1e4ea5d541716ebba63e8d4e15c58 (patch) | |
tree | ab8927036ac85f6f55d307a1183919d0e8eb617d /mount.cifs.c | |
parent | fba28cfe2f13dd8bdae3cec76178f42b001a40ca (diff) | |
download | cifs-utils-24093bef78e1e4ea5d541716ebba63e8d4e15c58.tar.gz cifs-utils-24093bef78e1e4ea5d541716ebba63e8d4e15c58.tar.bz2 cifs-utils-24093bef78e1e4ea5d541716ebba63e8d4e15c58.zip |
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 <jlayton@samba.org>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r-- | mount.cifs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |