]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-lualeak.patch
- fix for erase-before-install problem; rel 61
[packages/rpm.git] / rpm-lualeak.patch
1 --- rpm-4.4.9/rpmio/rpmlua.c    2007-02-03 21:23:54.000000000 +0200
2 +++ rpm-4_5/rpmio/rpmlua.c      2007-06-18 20:39:08.000000000 +0300
3 @@ -80,8 +80,8 @@
4      {  const char * _lua_path = rpmGetPath(_LUADOTDIR, "/lua/?.lua", NULL);
5         if (_lua_path != NULL) {
6             lua_pushliteral(L, "LUA_PATH");
7             lua_pushstring(L, _lua_path);
8 -           free(_lua_path);
9 +           if (_lua_path) free(_lua_path); _lua_path = NULL;
10         }
11      }
12      lua_rawset(L, LUA_GLOBALSINDEX);
13 @@ -94,7 +94,7 @@
14             struct stat st;
15             if (Stat(_lua_init, &st) != -1)
16                 (void)rpmluaRunScriptFile(lua, _lua_init);
17 -           free(_lua_init);
18 +           if (_lua_init) free(_lua_init); _lua_init = NULL;
19         }
20      }
21  #undef _LUADOTDIR
This page took 0.032566 seconds and 3 git commands to generate.