forked from github/server
make it easier for coverity to understand this code (there are no resource leaks)
This commit is contained in:
parent
05239659c8
commit
dcc819491f
2
critbit
2
critbit
|
@ -1 +1 @@
|
|||
Subproject commit 77130e660e2227ae740e06f38e85cd18ff728599
|
||||
Subproject commit dfe57a077222c6b572da61a79dc0687f81c10055
|
|
@ -2981,7 +2981,10 @@ spellbook * get_spellbook(const char * name)
|
|||
result = create_spellbook(name);
|
||||
assert(strlen(name) + sizeof(result) < sizeof(buffer));
|
||||
len = cb_new_kv(name, len, &result, sizeof(result), buffer);
|
||||
cb_insert(&cb_spellbooks, buffer, len);
|
||||
if (cb_insert(&cb_spellbooks, buffer, len) == CB_EXISTS) {
|
||||
log_error("cb_insert failed although cb_find returned nothing for spellbook=%s", name);
|
||||
assert(!"should not happen");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue