On Fri, Feb 23, 2018 at 10:06:16AM +0100, SF Markus Elfring wrote:
> > Calling crypto_free_shash(NULL) is actually fine.
> > It doesn't dereference the parameter, it just does pointer math on it in
> > crypto_shash_tfm() and returns if it's NULL in crypto_destroy_tfm().
> Can a passed null pointer really work in this function?
> static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)
> return &tfm->base;
Yes. It's not a dereference, it's just doing pointer math to get the