ALSA: hda/ca0132 - Fix memory leak at error path

The CA0132 codec driver doesn't call the free function at its error
path of the probe, which leaves the allocated memory. Call
ca0132_free() properly at the error handling.

Fixes: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection")
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+6 -2
+6 -2
sound/pci/hda/patch_ca0132.c
··· 4774 4774 4775 4775 err = ca0132_prepare_verbs(codec); 4776 4776 if (err < 0) 4777 - return err; 4777 + goto error; 4778 4778 4779 4779 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL); 4780 4780 if (err < 0) 4781 - return err; 4781 + goto error; 4782 4782 4783 4783 return 0; 4784 + 4785 + error: 4786 + ca0132_free(codec); 4787 + return err; 4784 4788 } 4785 4789 4786 4790 /*