提交 c5e0b6db 编写于 作者: T Takashi Iwai

ALSA: hda - Fix memory leaks at error path in patch_cirrus.c

The proper destructor should be called at the error path.

Cc: <stable@vger.kernel.org>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 7819d1c7
......@@ -1444,7 +1444,7 @@ static int patch_cs420x(struct hda_codec *codec)
return 0;
error:
kfree(codec->spec);
cs_free(codec);
codec->spec = NULL;
return err;
}
......@@ -1989,7 +1989,7 @@ static int patch_cs4210(struct hda_codec *codec)
return 0;
error:
kfree(codec->spec);
cs_free(codec);
codec->spec = NULL;
return err;
}
......@@ -2014,7 +2014,7 @@ static int patch_cs4213(struct hda_codec *codec)
return 0;
error:
kfree(codec->spec);
cs_free(codec);
codec->spec = NULL;
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册