On Wed, Sep 06, 2017 at 09:46:52PM +0200, SF Markus Elfring wrote: > @@ -336,21 +331,24 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci, > legacy_ctrl &= ~YMFPCI_LEGACY_FMEN; > pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl); > } else if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { > - snd_card_free(card); ^^^^^^^^^^^^^^^^^^^ > dev_err(card->dev, "cannot create opl3 hwdep\n"); ^^^^^^^^^ > - return err; > + goto free_card; Heh. I was worried that some of these re-orderings would introduce bugs but actually this one fixes a use after free. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html