"dev" <dev-boun...@openvswitch.org> wrote on 05/13/2016 12:33:07 PM:

> From: William Tu <u9012...@gmail.com>
> To: dev@openvswitch.org
> Date: 05/13/2016 12:33 PM
> Subject: [ovs-dev] [PATCH] ovsdb-server: Fix memory leak reported by
Valgind.
> Sent by: "dev" <dev-boun...@openvswitch.org>
>
> Reported by test 1657: ovsdb-server/add-db and remove-db.
>   ds_put_format (dynamic-string.c:142)
>   query_db_remotes (ovsdb-server.c:798)
>   reconfigure_remotes (ovsdb-server.c:988)
>   main_loop (ovsdb-server.c:156)
>
> Signed-off-by: William Tu <u9012...@gmail.com>
> ---
>  ovsdb/ovsdb-server.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
> index 4e2c8d0..0ec3053 100644
> --- a/ovsdb/ovsdb-server.c
> +++ b/ovsdb/ovsdb-server.c
> @@ -196,6 +196,7 @@ main_loop(struct ovsdb_jsonrpc_server *jsonrpc,
> struct shash *all_dbs,
>          }
>      }
>
> +    free(remotes_error);

Shouldn't this be

    if (remotes_error) {
        free(remotes_error);
    }

Ryan Moats
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to