Please don't drop the list.

The code in question looks like this:
    collectors_destroy(exporter->collectors);
    exporter->collectors = NULL;
and collectors_destroy() does nothing if passed a null pointer.

On Wed, Sep 16, 2015 at 10:57:39PM +0530, neeraj mehta wrote:
> both the below functions are called sequentially
>  dpif_ipfix_bridge_exporter_clear(exporter);
>  dpif_ipfix_exporter_destroy(&exporter->exporter);
> 
> and in both the functions code is freeing "exporter->collectors" through
> collector_destroy( ) function.
> 
> Regards
> Neeraj
> 
> On Wed, Sep 16, 2015 at 8:44 PM, Ben Pfaff <[email protected]> wrote:
> 
> > On Wed, Sep 16, 2015 at 08:12:24PM +0530, neeraj mehta wrote:
> > > Hi Team,
> > >
> > > I was looking a the code in ofproto-dpif-ipfix.c file. The
> > > function dpif_ipfix_bridge_exporter_destroy( ) invokes following two
> > > functions
> > >
> > > dpif_ipfix_bridge_exporter_destroy(struct dpif_ipfix_bridge_exporter
> > > *exporter)
> > > {
> > >     dpif_ipfix_bridge_exporter_clear(exporter);
> > >     dpif_ipfix_exporter_destroy(&exporter->exporter);
> > > }
> > >
> > > which internally invokes the following chain of functions
> > >
> > > dpif_ipfix_bridge_exporter_clear( )->dpif_ipfix_exporter_clear( )->
> > > collectors_destroy(exporter->collectors)
> > > dpif_ipfix_exporter_destroy ( )-> dpif_ipfix_exporter_clear ( )->
> > > collectors_destroy
> > > (exporter->collectors)
> > >
> > > So same pointer is destroyed 2 times in function. what's your view point
> > on
> > > same?
> >
> > Can you point to a specific pointer that is freed twice?
> >
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to