mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
staging: lustre: lustre: ptlrpc: sec_config.c: Fix for possible null pointer dereference
There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3456a40e8f
commit
fe456ff4bc
1 changed files with 6 additions and 4 deletions
|
|
@ -745,11 +745,13 @@ void sptlrpc_conf_log_update_begin(const char *logname)
|
|||
mutex_lock(&sptlrpc_conf_lock);
|
||||
|
||||
conf = sptlrpc_conf_get(fsname, 0);
|
||||
if (conf && conf->sc_local) {
|
||||
LASSERT(conf->sc_updated == 0);
|
||||
sptlrpc_conf_free_rsets(conf);
|
||||
if (conf) {
|
||||
if(conf->sc_local) {
|
||||
LASSERT(conf->sc_updated == 0);
|
||||
sptlrpc_conf_free_rsets(conf);
|
||||
}
|
||||
conf->sc_modified = 0;
|
||||
}
|
||||
conf->sc_modified = 0;
|
||||
|
||||
mutex_unlock(&sptlrpc_conf_lock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue