Fix memory leak in xapp-frame-py get_constants() 09/7209/3
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Fri, 3 Dec 2021 01:56:50 +0000 (03:56 +0200)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Fri, 3 Dec 2021 10:13:01 +0000 (12:13 +0200)
commitab881ae80afeee1ce99802dd6a50530ad7378268
tree08f729edcb1e826b0dc83a291367e698b3ceffe8
parent1e13f05bf0715a1027af5e0bc1afee69a8fca0c5
Fix memory leak in xapp-frame-py get_constants()

Xapp-frame-py get_constants() function calls c-code RMR library's
rmr_get_consts() function what allocates dynamic memory with strdup
call and returns allocated string to the caller in this case to
python's get_constants() via ctypes interface. This memory should be
freed, otherwise it causes memory leak. With this commit update RMR
version to 4.8.0 what has rmr_free_consts() function and call this
function in the end of get_constants() function to release allocated
memory.

Note that from now on it is required to have RMR version 4.8.0 or
newer version installed because rmr_free_consts() function was
introduced first time in RMR version 4.8.0. That's why bump
xapp-frame-py major version, new version is 3.0.0.

Temporally out scoped few unit test files because some change in
RMR version 4.5.2 causes UT failure. UTs will be fixed later.

Issue-Id: RIC-858

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: Ia4a134c5140760b1a1d6016da1e6763fec865c7a
Dockerfile-Unit-Test
docs/release-notes.rst
ricxappframe/rmr/rmrclib/rmrclib.py
rmr-version.yaml
setup.py
tox.ini