This PR addresses three potential memory leaks identified by the scan-build.sh script (which uses clang static analyzer). In order to avoid leaking memory a check is performed if memory has been previously allocated and if true it is freed accordingly.
Contribution description
This PR addresses three potential memory leaks identified by the
scan-build.sh
script (which uses clang static analyzer). In order to avoid leaking memory a check is performed if memory has been previously allocated and if true it is freed accordingly.Issues/PRs references
Fixes #339