mirror of https://github.com/ecmwf/eccodes.git
Clang static analyser: dereference of a null pointer
This commit is contained in:
parent
744c305e4e
commit
d738937dd0
|
@ -455,6 +455,7 @@ int grib_trie_with_rank_insert(grib_trie_with_rank* t, const char* key, void* da
|
||||||
grib_trie_with_rank* last = t;
|
grib_trie_with_rank* last = t;
|
||||||
const char* k = key;
|
const char* k = key;
|
||||||
DebugAssert(t);
|
DebugAssert(t);
|
||||||
|
if (!t) return -1;
|
||||||
|
|
||||||
GRIB_MUTEX_INIT_ONCE(&once, &init);
|
GRIB_MUTEX_INIT_ONCE(&once, &init);
|
||||||
GRIB_MUTEX_LOCK(&mutex);
|
GRIB_MUTEX_LOCK(&mutex);
|
||||||
|
|
Loading…
Reference in New Issue