diff options
author | William Tu <u9012063@gmail.com> | 2016-03-31 09:56:25 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-03-31 10:13:42 -0700 |
commit | 7209202eb863f655b8835fa0a3c7a541b405cf41 (patch) | |
tree | 37cf262dbfe2dda2416aa8a5d4d1636e85d157d4 /lib/ovs-router.c | |
parent | a5e9c53ce4539dac32036ea3ba3b916bcbf560e0 (diff) | |
download | openvswitch-7209202eb863f655b8835fa0a3c7a541b405cf41.tar.gz |
ovs-router: Fix memory leak at ovs_router_insert__.
Reported by Valgrind, testcase: ovn-controller-vtep - test vtep-lswitch.
ovs_router_insert__ (ovs-router.c:185)
route_table_handle_msg (route-table.c:299)
route_table_reset (route-table.c:186)
route_table_init (route-table.c:113)
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/ovs-router.c')
-rw-r--r-- | lib/ovs-router.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ovs-router.c b/lib/ovs-router.c index 0d52bf935..90e2f828d 100644 --- a/lib/ovs-router.c +++ b/lib/ovs-router.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 Nicira, Inc. + * Copyright (c) 2014, 2015, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -192,6 +192,7 @@ ovs_router_insert__(uint8_t priority, const struct in6_addr *ip6_dst, p->priority = priority; err = get_src_addr(ip6_dst, output_bridge, &p->src_addr); if (err) { + free(p); return err; } /* Longest prefix matches first. */ |