summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2021-01-05 23:21:26 +0300
committerSteve French <stfrench@microsoft.com>2021-01-13 21:55:29 +0300
commit77b6ec01c29aade01701aa30bf1469acc7f2be76 (patch)
treedd03b8bc345b4e7dedbb5939f1fc8d84150199fa /Kbuild
parent7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff)
downloadlinux-77b6ec01c29aade01701aa30bf1469acc7f2be76.tar.xz
cifs: check pointer before freeing
clang static analysis reports this problem dfs_cache.c:591:2: warning: Argument to kfree() is a constant address (18446744073709551614), which is not memory allocated by malloc() kfree(vi); ^~~~~~~~~ In dfs_cache_del_vol() the volume info pointer 'vi' being freed is the return of a call to find_vol(). The large constant address is find_vol() returning an error. Add an error check to dfs_cache_del_vol() similar to the one done in dfs_cache_update_vol(). Fixes: 54be1f6c1c37 ("cifs: Add DFS cache routines") Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> CC: <stable@vger.kernel.org> # v5.0+ Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions