From 6d26397a616586999f93fc4de30203db267a28f4 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 15 Jan 2009 09:22:58 +0200 Subject: [PATCH] Make sure global state gets NULLed on free - otherwise repeated read config -> free config like rpmbuild does will crash and burn - somewhat kludgy, figure a better way to do this --- rpmio/rpmlua.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rpmio/rpmlua.c b/rpmio/rpmlua.c index 4afa8d5..133fa16 100644 --- a/rpmio/rpmlua.c +++ b/rpmio/rpmlua.c @@ -84,6 +84,7 @@ void *rpmluaFree(rpmlua lua) if (lua->L) lua_close(lua->L); free(lua->printbuf); free(lua); + if (lua == globalLuaState) globalLuaState = NULL; } return NULL; } -- 2.7.4