[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix freeing uninitialized "struct xlate_out".
Ben Pfaff
blp at nicira.com
Fri Oct 11 06:12:24 UTC 2013
What's a normal function?
On Thu, Oct 10, 2013 at 11:08:23PM -0700, Alex Wang wrote:
> Hey Ben,
>
> With your change of execute_actions() function in ofproto/ofproto-dpif.c, I
> think it is better to reuse that code,
>
> So, I want to convert the execute_actions() as normal function. And use it
> in the xlate_send_packet().
>
> How do you think?
>
> Thanks,
> Alex Wang,
>
>
> On Thu, Oct 10, 2013 at 10:55 PM, Alex Wang <alexw at nicira.com> wrote:
>
> > Commit 91d6cd12 (ofproto-dpif: Move send_packet() to ofproto-dpif-xlate
> > module.) introduced the bug that uninit the "struct xlate_out" when
> > the struct is not initialized. This commit fixes the bug.
> >
> > Reported-by: Simon Horman <horms at verge.net.au>
> > Signed-off-by: Alex Wang <alexw at nicira.com>
> > ---
> > ofproto/ofproto-dpif-xlate.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> > index 4fb0d5e..964fb15 100644
> > --- a/ofproto/ofproto-dpif-xlate.c
> > +++ b/ofproto/ofproto-dpif-xlate.c
> > @@ -2899,8 +2899,7 @@ xlate_send_packet(const struct ofport_dpif *ofport,
> > struct ofpbuf *packet)
> > xout.odp_actions.data, xout.odp_actions.size,
> > packet, (xout.slow & SLOW_ACTION) != 0);
> > ovs_rwlock_unlock(&xlate_rwlock);
> > -
> > -out:
> > xlate_out_uninit(&xout);
> > +out:
> > return error;
> > }
> > --
> > 1.7.9.5
> >
> >
More information about the dev
mailing list