]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/tc_qdisc.c
Fix batch mode handle usage.
[mirror_iproute2.git] / tc / tc_qdisc.c
index 2a71208f6229f7c66d41e70360545210496feae3..7802d528fedddfad82024d28e521f9007efc61ed 100644 (file)
@@ -145,7 +145,6 @@ int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
 
                if ((idx = ll_name_to_index(d)) == 0) {
                        fprintf(stderr, "Cannot find device \"%s\"\n", d);
-                       rtnl_close(&rth);
                        return 1;
                }
                req.t.tcm_ifindex = idx;
@@ -241,7 +240,6 @@ static int print_qdisc(const struct sockaddr_nl *who,
 int tc_qdisc_list(int argc, char **argv)
 {
        struct tcmsg t;
-       struct rtnl_handle rth;
        char d[16];
 
        memset(&t, 0, sizeof(t));
@@ -275,7 +273,6 @@ int tc_qdisc_list(int argc, char **argv)
        if (d[0]) {
                if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
                        fprintf(stderr, "Cannot find device \"%s\"\n", d);
-                       rtnl_close(&rth);
                        return 1;
                }
                filter_ifindex = t.tcm_ifindex;