On Wed, Sep 13, 2023 at 06:44:08PM +0200, Christophe JAILLET wrote: > If __bch2_dev_attach_bdev() fails, bch2_dev_free() is called twice. > Once here and another time in the error handling path. > > This leads to several use-after-free. > > Remove the redundant call and only rely on the error handling path. Thanks, both applied