Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add null check #118

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/genl/genl_pdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ static int pdr_fill(struct pdr *pdr, struct gtp5g_dev *gtp, struct genl_info *in

pdr->af = AF_INET;
far = find_far_by_id(gtp, pdr->seid, *pdr->far_id);
rcu_assign_pointer(pdr->far, far);
if (!far) {
return -EINVAL;
}

err = far_set_pdr(pdr, gtp);
if (err)
Expand Down
2 changes: 2 additions & 0 deletions src/gtpu/encap.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ int update_urr_counter_and_send_report(struct pdr *pdr, struct far *far, u64 vol

for (i = 0; i < pdr->urr_num; i++) {
urr = find_urr_by_id(gtp, pdr->seid, pdr->urr_ids[i]);
if (!urr)
continue;

mnop = false;
if (urr->info & URR_INFO_MNOP)
Expand Down