Skip to content

Commit ee3c801

Browse files
committed
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 <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent ef605e8 commit ee3c801

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/cifs/dfs_cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,8 @@ int dfs_cache_get_tgt_share(char *path, const struct dfs_cache_tgt_iterator *it,
12671267
char **prefix)
12681268
{
12691269
char sep;
1270-
char *target_share, *ppath;
1270+
char *target_share;
1271+
char *ppath = NULL;
12711272
const char *target_ppath, *dfsref_ppath;
12721273
size_t target_pplen, dfsref_pplen;
12731274
size_t len, c;

0 commit comments

Comments
 (0)