Commit fe456ff4 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Greg Kroah-Hartman

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: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3456a40e
...@@ -745,11 +745,13 @@ void sptlrpc_conf_log_update_begin(const char *logname) ...@@ -745,11 +745,13 @@ void sptlrpc_conf_log_update_begin(const char *logname)
mutex_lock(&sptlrpc_conf_lock); mutex_lock(&sptlrpc_conf_lock);
conf = sptlrpc_conf_get(fsname, 0); conf = sptlrpc_conf_get(fsname, 0);
if (conf && conf->sc_local) { if (conf) {
if(conf->sc_local) {
LASSERT(conf->sc_updated == 0); LASSERT(conf->sc_updated == 0);
sptlrpc_conf_free_rsets(conf); sptlrpc_conf_free_rsets(conf);
} }
conf->sc_modified = 0; conf->sc_modified = 0;
}
mutex_unlock(&sptlrpc_conf_lock); mutex_unlock(&sptlrpc_conf_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment