Commit 531db9f3 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman

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

commit c5e0b6db upstream.

The proper destructor should be called at the error path.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ccb6ce1d
......@@ -1427,7 +1427,7 @@ static int patch_cs420x(struct hda_codec *codec)
return 0;
error:
kfree(codec->spec);
cs_free(codec);
codec->spec = NULL;
return err;
}
......@@ -1984,7 +1984,7 @@ static int patch_cs4210(struct hda_codec *codec)
return 0;
error:
kfree(codec->spec);
cs_free(codec);
codec->spec = NULL;
return err;
}
......@@ -2009,7 +2009,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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment