Skip to content

Commit

Permalink
cifs: fix uninitialized pointer in error case in dfs_cache_get_tgt_share
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve French committed Jun 4, 2022
1 parent ef605e8 commit ee3c801
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/dfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee3c801

Please sign in to comment.