Skip to content

Commit

Permalink
bevent: check ENOMEM for display name
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Dec 16, 2024
1 parent 6a6e95a commit d666b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ int odict_encode_bevent(struct odict *od, struct bevent *event)
err = odict_pl_add(od, "contact", &hdr->val);

if (pl_isset(&msg->from.dname))
odict_pl_add(od, "display", &msg->from.dname);
err = odict_pl_add(od, "display", &msg->from.dname);

err = re_sdprintf(&buf, "%H", uri_encode, &msg->from.uri);
err |= re_sdprintf(&buf, "%H", uri_encode, &msg->from.uri);
err |= odict_entry_add(od, "from", ODICT_STRING, buf);
mem_deref(buf);
if (err)
Expand Down

0 comments on commit d666b1c

Please sign in to comment.