Skip to content

Commit

Permalink
sip/auth: fix mem_zalloc return check (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Sep 14, 2022
1 parent 7da2ae2 commit 1c9e901
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sip/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ int sip_uas_auth_gen(struct sip_uas_auth **authp, const struct sip_msg *msg,
return EINVAL;

auth = mem_zalloc(sizeof(*auth), sip_uas_destructor);
if (!auth)
return ENOMEM;

auth->realm = realm;
err = gen_nonce(&auth->nonce, time(NULL), &msg->src, realm);

Expand Down

0 comments on commit 1c9e901

Please sign in to comment.