Re: [RFC PATCH 1/5] livepatch: Fix kobject memleak

From: Petr Mladek
Date: Thu May 02 2019 - 04:46:42 EST

On Thu 2019-05-02 12:31:38, Tobin C. Harding wrote:
> Currently error return from kobject_init_and_add() is not followed by a
> call to kobject_put(). This means there is a memory leak.

Strictly speaking there is no real memory leak in this case because
the structures are either static and or freed later via
klp_free*() functions.

That said, we could do the kobject manipulation a more clear way
as discussed in the 5th patch.

Anyway, thanks for cleaning this.

Best Regards,