Skip to contentSkip to conversation

fix one memory leak in sound jack

PATCH In review Lu Guanqun 3 participants 3 messages Feb 21, 2011 Sound

lore
Share & tools
lore

Lu Guanqun

author
#0 lore raw

PATCH 1/1 fix one memory leak in sound jack

---
 sound/core/jack.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/core/jack.c +1 -0
index 4902ae5..53b53e9 100644
@@ -141,6 +141,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
 
 fail_input:
 	input_free_device(jack->input_dev);
+	kfree(jack->id);
 	kfree(jack);
 	return err;
 }
Signature · 1 line
1.7.2.3
Reviewed-by on v1 1/1
#1 lore raw

Guanqun, it helps to point out the commit that first introduced the problem.

Quoted 19 lines · Lu Guanqun
---
 sound/core/jack.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/core/jack.c +1 -0
index 4902ae5..53b53e9 100644
@@ -141,6 +141,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
 
 fail_input:
 	input_free_device(jack->input_dev);
+	kfree(jack->id);
 	kfree(jack);
 	return err;
 }
Signature · 1 line
1.7.2.3
#2 lore raw
In reply to Lu Guanqun

At Mon, 21 Feb 2011 13:45:04 +0800,

Quoted 2 lines · Lu Guanqun

Applied now. Thanks.

Takashi

Quoted 19 lines
---
 sound/core/jack.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/core/jack.c +1 -0
index 4902ae5..53b53e9 100644
@@ -141,6 +141,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
 
 fail_input:
 	input_free_device(jack->input_dev);
+	kfree(jack->id);
 	kfree(jack);
 	return err;
 }
Signature · 1 line
1.7.2.3