insmod: fix memory leak
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Wed, 30 Sep 2009 16:22:10 +0000 (17:22 +0100)
committerAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Thu, 25 Feb 2010 16:00:44 +0000 (16:00 +0000)
commit8c7c5c102426cafcb2d118e307f246df66d650de
treea3ae13a56480d0fd68c3c8f56ed2816457a6d3b7
parent6392a1a21c0c2a6edb6579f27d897b5c880ad98d
insmod: fix memory leak

insmod makes a half-successful attempt to clean up on failure.  Let's
make it clean up on all failures, and remember to clean up on success
as well.

This leaves modprobe as the only leaky program, at least for the code
paths executed by the test suite.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
insmod.c