mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
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: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7819d1c70e
commit
c5e0b6dbad
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user