gplugin/gplugin

Ensure Lua state is closed on error

6 months ago, Elliott Sales de Andrade
ab8f907594f5
Ensure Lua state is closed on error

It's done by the plugin object finalize if it's created, but not on the early
exits before the object is created.

Testing Done:
Compiled and ran tests.

Reviewed at https://reviews.imfreedom.org/r/2783/
The following individuals have contributed to this project.
Ankit Vani <a@nevitus.org>
EionRobb <eion@robbmob.com>
Elliott Sales de Andrade <quantum.analyst@gmail.com>
Gary Kramlich <grim@reaperworld.com>
Jason Scherer <schereja@gmail.com>
John Bailey <rekkanoryo@rekkanoryo.org>
Mike Ruprecht <cmaiku@gmail.com>
Olaf Hering <olaf@aepfle.de>
Paul Jimenez <pj@place.org>
Richard Laager <rlaager@pidgin.im>
Sorvival <sorvival@tutanota.com>
ivanhoe <ivanhoe@fiscari.de>