plugins/python: memleak fixes in test
The main problem was that string array objects were constructed differently: - if constructed by the test, then the elements were constant - if constructed by the plugin, then the elements were allocated Modified it so that now each array contains allocated strings so they can be handled similarly. For freeing, I have used the str_array_free function from the plugin, so I have linked its object into the test runner. Happy path is now free of "definitely lost" memleaks, so the test can be used for valgrind.
This commit is contained in:

committed by
Todd C. Miller

parent
ac61b5655d
commit
a3a7630ff4
@@ -130,7 +130,7 @@ VERSION = @PACKAGE_VERSION@
|
||||
|
||||
TEST_PROGS = check_python_examples
|
||||
|
||||
CHECK_PYTHON_EXAMPLES_OBJS = check_python_examples.o iohelpers.o testhelpers.o
|
||||
CHECK_PYTHON_EXAMPLES_OBJS = check_python_examples.o iohelpers.o testhelpers.o pyhelpers.lo sudo_python_debug.lo
|
||||
|
||||
all: python_plugin.la
|
||||
|
||||
|
Reference in New Issue
Block a user