ctrl: Fix fd leak in ctrl_list()
if ctrl_list is called with get operation and wrong number of parameters, it would forget to close the local netlink handle. Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
committed by
Stephen Hemminger
parent
e333097527
commit
35c0215739
@@ -267,7 +267,7 @@ static int ctrl_list(int cmd, int argc, char **argv)
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Wrong number of params\n");
|
||||
return -1;
|
||||
goto ctrl_done;
|
||||
}
|
||||
|
||||
if (matches(*argv, "name") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user