lcr: fix double free on error
On mod_init() error the lcr module did attempt to free twice all
the shared memory allocated vars (free_shared_memory() is called
twice on error, once when mod_init() fails and once when the
module destroy function is called).