mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
snap-policy: fix memory leak
This patch fixes a memory leak when there is a snap with an invalid ID.
This commit is contained in:
parent
fed1432172
commit
4d3658b271
1 changed files with 1 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ pw_sandbox_access_t pw_snap_get_audio_permissions(struct client *client, int fd,
|
|||
snap_id = g_strdup(aa_label + strlen(SNAP_LABEL_PREFIX));
|
||||
separator = strchr(snap_id, '.');
|
||||
if (separator == NULL) {
|
||||
g_free(snap_id);
|
||||
pw_log_info("snap_get_audio_permissions: aa_label has only one dot; not a valid ID.");
|
||||
return PW_SANDBOX_ACCESS_NONE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue