degesch: Lua: fix memory leak on load failure

This commit is contained in:
Přemysl Eric Janouch 2016-01-17 22:57:16 +01:00
parent 588a696c68
commit 221ae03b5c

View File

@ -8845,8 +8845,7 @@ lua_plugin_load (struct app_context *ctx, const char *filename,
else
return &plugin->super;
lua_close (L);
free (plugin);
plugin_destroy (&plugin->super);
return NULL;
}