FIX: Introduced destroy() functions for kobject-derived classes and thus fixed memory leak.
#!/bin/shmodule="ec_msr_sample"device="msr"# invoke rmmod with all arguments we got/sbin/rmmod $module $* || exit 1# Remove stale nodesrm -f /dev/${device} /dev/${device}0