mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pulse-server: don't leak formats
This commit is contained in:
parent
a6c35d1df4
commit
99fcc95d18
3 changed files with 17 additions and 1 deletions
|
|
@ -249,6 +249,7 @@ static int read_format_info(struct message *m, struct format_info *info)
|
|||
int res;
|
||||
uint8_t tag, encoding;
|
||||
|
||||
spa_zero(*info);
|
||||
if ((res = read_u8(m, &tag)) < 0)
|
||||
return res;
|
||||
if (tag != TAG_U8)
|
||||
|
|
@ -265,7 +266,9 @@ static int read_format_info(struct message *m, struct format_info *info)
|
|||
info->props = pw_properties_new(NULL, NULL);
|
||||
if (info->props == NULL)
|
||||
return -errno;
|
||||
return read_props(m, info->props);
|
||||
if ((res = read_props(m, info->props)) < 0)
|
||||
format_info_clear(info);
|
||||
return res;
|
||||
}
|
||||
|
||||
static int message_get(struct message *m, ...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue