summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-01-16 06:18:19 (GMT)
committerThomas Haller <thaller@redhat.com>2018-01-16 06:18:20 (GMT)
commit22f8e867bac80b8c2e0cd16165e0844bdd3d618b (patch)
tree681ab4a6479e556a2fc126e27d9536e2468750f2 /lib
parent11580c5564122ee6c282fe9cdcde7c8d88047c63 (diff)
downloadlibnl-22f8e867bac80b8c2e0cd16165e0844bdd3d618b.zip
libnl-22f8e867bac80b8c2e0cd16165e0844bdd3d618b.tar.gz
libnl-22f8e867bac80b8c2e0cd16165e0844bdd3d618b.tar.bz2
route: fix memleak in rtnl_netem_set_delay_distribution_data()
Diffstat (limited to 'lib')
-rw-r--r--lib/route/qdisc/netem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/route/qdisc/netem.c b/lib/route/qdisc/netem.c
index 2462244..05c2eb9 100644
--- a/lib/route/qdisc/netem.c
+++ b/lib/route/qdisc/netem.c
@@ -956,7 +956,9 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist
free(line);
fclose(f);
- return rtnl_netem_set_delay_distribution_data(qdisc, data, n);
+ i = rtnl_netem_set_delay_distribution_data(qdisc, data, n);
+ free(data);
+ return i;
}
/** @} */