[ovs-dev] [leaks 5/7] ovsdb-server: Fix memory leak when manager table has no status column.

Ethan Jackson ethan at nicira.com
Tue Jan 8 21:33:20 UTC 2013


Acked-by: Ethan Jackson <ethan at nicira.com>


On Wed, Dec 26, 2012 at 12:38 PM, Ben Pfaff <blp at nicira.com> wrote:

> This is a corner case.  I doubt that it's triggered in practice outside the
> unit tests.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  ovsdb/ovsdb-server.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
> index 69548c2..6032d73 100644
> --- a/ovsdb/ovsdb-server.c
> +++ b/ovsdb/ovsdb-server.c
> @@ -523,6 +523,10 @@ write_string_string_column(struct ovsdb_row *row,
> const char *column_name,
>      datum = get_datum(row, column_name, OVSDB_TYPE_STRING,
> OVSDB_TYPE_STRING,
>                        UINT_MAX);
>      if (!datum) {
> +        for (i = 0; i < n; i++) {
> +            free(keys[i]);
> +            free(values[i]);
> +        }
>          return;
>      }
>
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130108/49fb4d3a/attachment-0003.html>


More information about the dev mailing list