소스 검색

[ALSA] Fix memory leak in sound/isa/es18xx.c

Fixed a memory leak in the error patch.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Eric Sesterhenn 18 년 전
부모
커밋
92b93d3171
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      sound/isa/es18xx.c

+ 1 - 0
sound/isa/es18xx.c

@@ -2154,6 +2154,7 @@ static int __devinit snd_audiodrive_pnpc(int dev, struct snd_audiodrive *acard,
 	}
 	}
 	/* Control port initialization */
 	/* Control port initialization */
 	if (pnp_activate_dev(acard->devc) < 0) {
 	if (pnp_activate_dev(acard->devc) < 0) {
+		kfree(cfg);
 		snd_printk(KERN_ERR PFX "PnP control configure failure (out of resources?)\n");
 		snd_printk(KERN_ERR PFX "PnP control configure failure (out of resources?)\n");
 		return -EAGAIN;
 		return -EAGAIN;
 	}
 	}