On Wed, Jul 27, 2016 at 12:43 PM, Ben Pfaff <b...@ovn.org> wrote:

> On Tue, Jul 26, 2016 at 01:08:06PM -0700, Andy Zhou wrote:
> > Release the memory of reply message of the initial "monitor" request.
> >
> > Reported-at: http://openvswitch.org/pipermail/dev/2016-July/076075.html
> > Signed-off-by: Andy Zhou <az...@ovn.org>
> > ---
> >  ovsdb/replication.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/ovsdb/replication.c b/ovsdb/replication.c
> > index 3d589ef..af7ae5c 100644
> > --- a/ovsdb/replication.c
> > +++ b/ovsdb/replication.c
> > @@ -365,6 +365,10 @@ get_initial_db_state(const struct db *database)
> >      if (msg->type == JSONRPC_REPLY) {
> >          process_notification(msg->result, database->db);
> >      }
> > +
> > +    if (msg) {
> > +        jsonrpc_msg_destroy(msg);
> > +    }
> >  }
>
> The 'if' isn't needed.
>
Right,  jsonrpc_msg_destroy() checks for NULL internally.

I will drop the 'if' before pushing.  Thanks for catching it.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to