ALSA: seq: Fix memory leak at error path in snd_seq_create_port()
PATCH 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.
--- 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