mirror_iproute2/devlink
Andrea Claudi ec1346acbe devlink: fix memory leak in cmd_dev_flash()
nlg_ntf is dinamically allocated in mnlg_socket_open(), and is freed on
the out: return path. However, some error paths do not free it,
resulting in memory leak.

This commit fix this using mnlg_socket_close(), and reporting the
correct error number when required.

Fixes: 9b13cddfe2 ("devlink: implement flash status monitoring")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-12-14 09:23:24 -08:00
..
.gitignore devlink: ignore build result 2016-04-11 13:35:12 -07:00
devlink.c devlink: fix memory leak in cmd_dev_flash() 2020-12-14 09:23:24 -08:00
Makefile iproute2: Installation errors without libmnl 2018-12-04 14:27:08 -08:00
mnlg.c devlink: implement flash status monitoring 2019-09-16 07:49:25 -07:00
mnlg.h devlink: implement flash status monitoring 2019-09-16 07:49:25 -07:00