Skip to content
Snippets Groups Projects
Commit 95c75454 authored by Jesper Juhl's avatar Jesper Juhl Committed by Jiri Kosina
Browse files

CIFS: Don't free volume_info->UNC until we are entirely done with it.


In cleanup_volume_info_contents() we kfree(volume_info->UNC); and then
proceed to use that variable on the very next line.
This causes (at least) Coverity Prevent to complain about use-after-free
of that variable (and I guess other checkers may do that as well).
There's not any /real/ problem here since we are just using the value of
the pointer, not actually dereferencing it, but it's still trivial to
silence the tool, so why not?
To me at least it also just seems nicer to defer freeing the variable
until we are entirely done with it in all respects.

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent bfb9035c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment