core: fix resource leak in manager_environment_add

System Internals / systemd - Andreas Henriksson [fatal.se] - 16 September 2014 14:47 UTC

Second error path must free the (potentially) allocated memory in the first code chunk before returning.

Found by coverity. Fixes: CID#1237750

aa9f8a3 core: fix resource leak in manager_environment_add
src/core/manager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Upstream: github.com


  • Share