> -----Original Message----- > From: Cornelia Huck <cohuck@xxxxxxxxxx> > Sent: Tuesday, August 27, 2019 3:54 PM > To: Parav Pandit <parav@xxxxxxxxxxxx> > Cc: alex.williamson@xxxxxxxxxx; Jiri Pirko <jiri@xxxxxxxxxxxx>; > kwankhede@xxxxxxxxxx; davem@xxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; linux- > kernel@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 1/4] mdev: Introduce sha1 based mdev alias > > On Mon, 26 Aug 2019 15:41:16 -0500 > Parav Pandit <parav@xxxxxxxxxxxx> wrote: > > > > static int __init mdev_init(void) > > { > > + alias_hash = crypto_alloc_shash("sha1", 0, 0); > > + if (!alias_hash) > > + return -ENOMEM; > > + > > return mdev_bus_register(); > > Don't you need to call crypto_free_shash() if mdev_bus_register() fails? > Missed to answer this in previous reply. Yes, took care of it in v1. Mark Bloch also pointed it to me.