osmux: Use msgb_copy() API in osmux_replay_lost_packets()

Change-Id: I137872af77dbce68210ad8ef7f61bd337811c7c4
This commit is contained in:
Pau Espin 2022-11-14 17:12:23 +01:00
parent 17fca03cf8
commit ac73f1c330
1 changed files with 1 additions and 4 deletions

View File

@ -385,13 +385,10 @@ static int osmux_replay_lost_packets(struct osmux_circuit *circuit,
struct msgb *clone;
/* Clone last RTP packet seen */
clone = msgb_alloc(last->data_len, "RTP clone");
clone = msgb_copy(last, "RTP clone");
if (!clone)
continue;
memcpy(clone->data, last->data, last->len);
msgb_put(clone, last->len);
/* The original RTP message has been already sanity checked. */
rtph = osmo_rtp_get_hdr(clone);