aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elua/io.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-06-11 11:12:27 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-06-11 11:12:27 +0100
commitcd29d76ce57071d5db7336d1bfd6471f8b2070bf (patch)
tree8993d1f0402d80884b4ade377d81a9a9a0705e2a /src/bin/elua/io.c
parentRevert "Eolian CXX: Fix make distcheck" (diff)
downloadefl-cd29d76ce57071d5db7336d1bfd6471f8b2070bf.tar.gz
elua: fix coverity issues
Diffstat (limited to 'src/bin/elua/io.c')
-rw-r--r--src/bin/elua/io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/elua/io.c b/src/bin/elua/io.c
index dc65ba4b21..d5100440e9 100644
--- a/src/bin/elua/io.c
+++ b/src/bin/elua/io.c
@@ -67,6 +67,9 @@ elua_popen_c(const char *path, const char *md, const char *argv[])
#else
ret = _popen(cmdline, md);
#endif
+
+ free(cmdline);
+
if (!ret) return NULL;
return ret;
@@ -204,6 +207,7 @@ elua_readline(lua_State *L)
if (!f)
{
luaL_error(L, "file is already closed");
+ return 0; /* shut up coverity; luaL_error does a longjmp */
}
success = read_line(L, f);
if (ferror(f))
@@ -357,8 +361,8 @@ elua_popen(lua_State *L)
}
else
{
- const char **argv = { NULL };
- *pf = elua_popen_c(fname, mode, argv);
+ const char *argv = NULL;
+ *pf = elua_popen_c(fname, mode, &argv);
}
return (!*pf) ? push_ret(L, 0, fname) : 1;
}