From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Dan Carpenter <dan.carpenter@oracle.com>, alsa-devel@alsa-project.org
Cc: kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Takashi Iwai <tiwai@suse.com>,
David Howells <dhowells@redhat.com>,
Ingo Molnar <mingo@kernel.org>,
Bhumika Goyal <bhumirks@gmail.com>
Subject: Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()
Date: Thu, 07 Sep 2017 07:41:39 +0000 [thread overview]
Message-ID: <1b93c810-34c7-8439-d7cd-c303185dfe66@users.sourceforge.net> (raw)
In-Reply-To: <20170906215120.m7ifun3doq5famva@mwanda>
>> @@ -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.
Thanks for your constructive feedback.
Does it mean that a special tag should be added to a commit message?
Regards,
Markus
next prev parent reply other threads:[~2017-09-07 7:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 19:45 [PATCH 0/3] ALSA: ymfpci: Fine-tuning for some function implementations SF Markus Elfring
2017-09-06 19:46 ` [PATCH 1/3] ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe() SF Markus Elfring
2017-09-06 21:51 ` Dan Carpenter
2017-09-07 7:41 ` SF Markus Elfring [this message]
2017-09-07 8:09 ` Takashi Iwai
2017-09-07 8:35 ` Takashi Iwai
2017-09-06 19:48 ` [PATCH 2/3] ALSA: ymfpci: Use common error handling code in snd_ymfpci_create() SF Markus Elfring
2017-09-07 8:35 ` Takashi Iwai
2017-09-06 19:50 ` [PATCH 3/3] ALSA: ymfpci: Adjust 17 checks for null pointers SF Markus Elfring
2017-09-07 8:35 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b93c810-34c7-8439-d7cd-c303185dfe66@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=alsa-devel@alsa-project.org \
--cc=bhumirks@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=dhowells@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox