Initialize the backmap field in new_entry for capability addition

The old code implicitly initialized it to 0 by overwriting a
zero-initialized array terminator. Now that we construct the new entry
from scratch, we need to do this manually.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
Ryan Lee 2024-11-14 17:14:16 -08:00
parent a422d2ea17
commit a513d02297

View file

@ -337,6 +337,7 @@ class capability_lookup {
return add_cap_result::ERROR;
}
new_entry.cap = cap;
new_entry.backmap = 0;
new_entry.flags = flag;
try {
this->add_capability_table_entry_raw(new_entry);