awesome.spawn(): Check table arguments better
commit5432e0a332c61abcfee8c08efab07ebf793f29c7
authorUli Schlachter <psychon@znc.in>
Wed, 12 Mar 2014 10:12:23 +0000 (12 11:12 +0100)
committerUli Schlachter <psychon@znc.in>
Wed, 12 Mar 2014 10:12:23 +0000 (12 11:12 +0100)
treefd788795d1805a34a3f4c879c610e8983aa86345
parent800a9a41f6b705612ebe1d42246e05b77fbd281d
awesome.spawn(): Check table arguments better

Previously, any not-string-convertible entry in the array argument would result
in lua_tostring() returning NULL which g_strdup() would pass through. Thus, we
would end up with a NULL entry in an array whose end is marked with a NULL
entry. This mainly means that we had a memory leak.

Fix this by actually verifying that we only have strings in the table that we
are looking at.

Signed-off-by: Uli Schlachter <psychon@znc.in>
spawn.c