diff options
author | Steve French <stfrench@microsoft.com> | 2022-06-04 01:18:37 -0500 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-06-04 13:33:42 -0500 |
commit | ee3c8019cce254f586b7fc2c5b836c275b275527 (patch) | |
tree | a0d0ede2e089af3c58bf57a1470549e59f5a8605 /fs/cifs | |
parent | ef605e86821253d16d47a02ce1f766a461614fef (diff) |
cifs: fix uninitialized pointer in error case in dfs_cache_get_tgt_share
Set default value of ppath to null.
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/dfs_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c index 7b978a126268..34a8f3baed5e 100644 --- a/fs/cifs/dfs_cache.c +++ b/fs/cifs/dfs_cache.c @@ -1267,7 +1267,8 @@ int dfs_cache_get_tgt_share(char *path, const struct dfs_cache_tgt_iterator *it, char **prefix) { char sep; - char *target_share, *ppath; + char *target_share; + char *ppath = NULL; const char *target_ppath, *dfsref_ppath; size_t target_pplen, dfsref_pplen; size_t len, c; |