lua: fix some nasty memory leaks

2 jobs for lua-monitors in 1 minute and 13 seconds (queued for 1 second)
Status Job ID Name Coverage
  Container
passed #6777275
container_fedora

00:00:15

 
  Build
passed #6777276
build_on_fedora

00:00:58