find_vec() is supposed to find the vector in the list if it exists,
choose an empty slot if it doesn't exist, and return null if all slots
are full.
However, coverity noticed that although the callers of find_vec() handle
the last condition, find_vec() itself didn't.
Check to see if we actually found an empty slot before attempting to
initialize it.
CID
1306864
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
o = vla->outstanding.list + i;
}
- if(!o->valid) {
+ if(o && !o->valid) {
o->vec = vec;
o->valid = 1;
}