mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
pulse-server: free message when resize fails
Based on patch by Peter Hutterer Fixes !701
This commit is contained in:
parent
8892152b13
commit
a138152bef
1 changed files with 3 additions and 1 deletions
|
|
@ -194,8 +194,10 @@ static struct message *message_alloc(struct impl *impl, uint32_t channel, uint32
|
||||||
msg->stat->n_allocated++;
|
msg->stat->n_allocated++;
|
||||||
msg->stat->n_accumulated++;
|
msg->stat->n_accumulated++;
|
||||||
}
|
}
|
||||||
if (ensure_size(msg, size) < 0)
|
if (ensure_size(msg, size) < 0) {
|
||||||
|
message_free(impl, msg, false, true);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
spa_zero(msg->extra);
|
spa_zero(msg->extra);
|
||||||
msg->channel = channel;
|
msg->channel = channel;
|
||||||
msg->offset = 0;
|
msg->offset = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue