kmodloader: fix memleak adding to avl tree
authorTony Ambardar <itugrok@yahoo.com>
Wed, 24 Jan 2024 08:17:06 +0000 (00:17 -0800)
committerTony Ambardar <itugrok@yahoo.com>
Sat, 2 Mar 2024 21:56:56 +0000 (13:56 -0800)
commit1c9aaefc119a908c6a9849e96330443c7439e5d1
tree4a3b6b2faf89bc5d8039abbbf828507260981ab1
parent4c5c45c6beac586c994af34a795bc5f2232f5f3d
kmodloader: fix memleak adding to avl tree

Check avl_insert() return value and free node data on error, otherwise this
is observed to directly leak memory.

Fixes: 6e3c6dcf922e ("kmodloader: add module alias awareness")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
kmodloader.c