<feed xmlns='http://www.w3.org/2005/Atom'>
<title>uci/tests/cram/lua/test_cases, branch master</title>
<subtitle>OpenWrt Unified Configuration Interface</subtitle>
<id>https://git-03.infra.openwrt.org/project/uci/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/project/uci/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/uci/'/>
<updated>2019-11-14T16:11:34Z</updated>
<entry>
<title>lua: fix memory leak in set method</title>
<updated>2019-11-14T16:11:34Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T22:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/uci/commit/?id=39093f3b040df895da812e2932b55feeeb1201df'/>
<id>urn:sha1:39093f3b040df895da812e2932b55feeeb1201df</id>
<content type='text'>
scan-build from clang version 9 has reported following issue:

 uci.c:624:12: warning: Potential leak of memory pointed to by 's'
       return luaL_error(L, "Cannot set an uci option to an empty table value");
              ^~~~~~~~~~

valgrind confirmed it on the supplied test case:

 ==31013== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1
 ==31013==    by 0x56C49B9: strdup (strdup.c:42)

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>lua: fix memory leak in changes method</title>
<updated>2019-11-14T16:11:34Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T21:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/uci/commit/?id=19ceff323f1e2e7df26031a9fae29fff2edc65bd'/>
<id>urn:sha1:19ceff323f1e2e7df26031a9fae29fff2edc65bd</id>
<content type='text'>
Configs returned by uci_list_configs call are not freed when not needed,
leading to the memory leak. While at it make the code cleaner.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
</feed>
