mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-22 19:26:05 +00:00
Merge pull request #6529 from ton31337/fix/refcnt_check_for_dep_data_route-map
lib: Make sure route_map_dep_data is not NULL before decrementing refcount
This commit is contained in:
commit
58ef49eb43
@ -2747,7 +2747,12 @@ static int route_map_dep_update(struct hash *dephash, const char *dep_name,
|
||||
memset(&tmp_dep_data, 0, sizeof(struct route_map_dep_data));
|
||||
tmp_dep_data.rname = rname;
|
||||
dep_data = hash_lookup(dep->dep_rmap_hash, &tmp_dep_data);
|
||||
dep_data->refcnt--;
|
||||
|
||||
if (!dep_data)
|
||||
goto out;
|
||||
|
||||
if (dep_data->refcnt)
|
||||
dep_data->refcnt--;
|
||||
|
||||
if (!dep_data->refcnt) {
|
||||
ret_dep_data = hash_release(dep->dep_rmap_hash,
|
||||
|
Loading…
Reference in New Issue
Block a user