lua: fix memory leak in changes method
authorPetr Štetiar <ynezz@true.cz>
Mon, 4 Nov 2019 21:41:18 +0000 (22:41 +0100)
committerPetr Štetiar <ynezz@true.cz>
Thu, 14 Nov 2019 16:11:34 +0000 (17:11 +0100)
commit19ceff323f1e2e7df26031a9fae29fff2edc65bd
tree49fff1f82a6f0a1d770c14a216668f67da9b2cd4
parent18049a84fe402068ba10dfcffe6dbb088aefc53a
lua: fix memory leak in changes method

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 <ynezz@true.cz>
lua/uci.c
tests/cram/lua/test_cases/changes_doesnt_leak.lua [new file with mode: 0644]
tests/cram/test_ucilua_testcases.t [new file with mode: 0644]