ALSA: seq: Fix memory leak at error path in snd_seq_create_port()
PATCH v2 1/1 ALSA: seq: Fix memory leak at error path in snd_seq_create_port()
We forgot to release a newly allocated item at the error path in snd_seq_create_port(). This patch fixes it.
Fixes 7c3f0d3d3a11 ("ALSA: seq: Check the conflicting port at port creation")
Reported-by [email protected]
Signed-off-by Takashi Iwai <[email protected]>
---v1->v2: only patch meta data correction
sound/core/seq/seq_ports.c | 1 + 1 file changed, 1 insertion(+)
sound/core/seq/seq_ports.c +1 -0
@@ -149,6 +149,7 @@ int snd_seq_create_port(struct snd_seq_client *client, int port,write_lock_irq (&client->ports_lock);list_for_each_entry (p, &client->ports_list_head, list) {if (p->addr.port == port) { +kfree (new_port); num = -EBUSY ; goto unlock; }
Signature · 1 line
2.35.3