Skip to content

Commit

Permalink
ovn-northd: fix memory leak in add_distributed_nat_routes() function
Browse files Browse the repository at this point in the history
Within this function actions & match dynamic strings are used as helper
variables for adding entries into logical flow table. Variables are
used several times in order to optimize number of memory allocations,
however at the end memory was forgotten to be deallocated.

Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
damijans authored and ovsrobot committed Aug 2, 2019
1 parent a8f005c commit 853c1b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ovn/northd/ovn-northd.c
Expand Up @@ -5667,6 +5667,8 @@ add_distributed_nat_routes(struct hmap *lflows, const struct ovn_port *op)
ds_clear(&actions);
}
}
ds_destroy(&match);
ds_destroy(&actions);
}

static void
Expand Down

0 comments on commit 853c1b1

Please sign in to comment.