Skip to content

Commit

Permalink
ovs-router: Fix memory leak at ovs_router_insert__.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
williamtu authored and blp committed Mar 31, 2016
1 parent a5e9c53 commit 7209202
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ovs-router.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 7209202

Please sign in to comment.