projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe2167e
)
Plug a memory leak on Lua rpm.expand()
author
Panu Matilainen
<pmatilai@redhat.com>
Tue, 24 May 2011 16:59:36 +0000
(19:59 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Tue, 24 May 2011 17:00:51 +0000
(20:00 +0300)
rpmio/rpmlua.c
patch
|
blob
|
history
diff --git
a/rpmio/rpmlua.c
b/rpmio/rpmlua.c
index
a2f70bf
..
1f9254a
100644
(file)
--- a/
rpmio/rpmlua.c
+++ b/
rpmio/rpmlua.c
@@
-604,7
+604,9
@@
static int rpm_b64decode(lua_State *L)
static int rpm_expand(lua_State *L)
{
const char *str = luaL_checkstring(L, 1);
- lua_pushstring(L, rpmExpand(str, NULL));
+ char *val = rpmExpand(str, NULL);
+ lua_pushstring(L, val);
+ free(val);
return 1;
}