[ovs-dev] [PATCH] ovs-ofctl: Fix minor memory leaks.

Ethan Jackson ethan at nicira.com
Fri Feb 3 20:40:06 UTC 2012


Looks good,

Ethan

On Fri, Feb 3, 2012 at 12:38, Ben Pfaff <blp at nicira.com> wrote:
> Found by valgrind.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  utilities/ovs-ofctl.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
> index 9b1a1b2..7df0a90 100644
> --- a/utilities/ovs-ofctl.c
> +++ b/utilities/ovs-ofctl.c
> @@ -447,6 +447,8 @@ fetch_switch_config(struct vconn *vconn, struct
ofp_switch_config *config_)
>
>     config = reply->data;
>     *config_ = *config;
> +
> +    ofpbuf_delete(reply);
>  }
>
>  static void
> @@ -869,6 +871,8 @@ monitor_vconn(struct vconn *vconn)
>         unixctl_server_wait(server);
>         poll_block();
>     }
> +    vconn_close(vconn);
> +    unixctl_server_destroy(server);
>  }
>
>  static void
> --
> 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/20120203/aef3555f/attachment-0003.html>


More information about the dev mailing list