summaryrefslogtreecommitdiff
path: root/luaext
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-01-04 13:30:14 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-01-04 13:30:14 +0200
commit05dcdf44d03d6a953d1e5aa15de3269a582ff9f2 (patch)
treed4a20b7703c05e14a88fe4e8260f1bcf6ce78849 /luaext
parentf895acd285366cf58cc3c97b5f188fecbfd782a8 (diff)
downloadrpm-05dcdf44d03d6a953d1e5aa15de3269a582ff9f2.tar.gz
rpm-05dcdf44d03d6a953d1e5aa15de3269a582ff9f2.tar.bz2
rpm-05dcdf44d03d6a953d1e5aa15de3269a582ff9f2.zip
Use rpm's own strdup() clone everywhere
Diffstat (limited to 'luaext')
-rw-r--r--luaext/lposix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/luaext/lposix.c b/luaext/lposix.c
index cf609a5a9..ae407a1e2 100644
--- a/luaext/lposix.c
+++ b/luaext/lposix.c
@@ -22,6 +22,7 @@
#include <time.h>
#include <unistd.h>
#include <utime.h>
+#include <rpm/rpmutil.h>
#define MYNAME "posix"
#define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003"
@@ -768,7 +769,7 @@ static int Pmkstemp(lua_State *L)
path = luaL_checkstring(L, 1);
if (path == NULL)
return 0;
- dynpath = strdup(path);
+ dynpath = rstrdup(path);
fd = mkstemp(dynpath);
f = (FILE**)lua_newuserdata(L, sizeof(FILE*));
if (f == NULL) {