ofproto-dpif-upcall: Fix a free of uninitialized memory.
authorAlex Wang <alexw@nicira.com>
Mon, 8 Sep 2014 17:41:36 +0000 (10:41 -0700)
committerAlex Wang <alexw@nicira.com>
Mon, 8 Sep 2014 20:07:07 +0000 (13:07 -0700)
commit3d76b86c6f0b56ee8649356c49e89dd5022451b2
tree5c0591b5b624d40e993e270fe1e3a852de99009c
parent46a14035521c52bf38d6e32927a8e33f19c76fff
ofproto-dpif-upcall: Fix a free of uninitialized memory.

On current master, when 'upcall_receive()' returns error, the
ofpbuf 'upcall->put_actions' is uninitialized.  In some usecase,
the failure of 'upcall_receive()' will cause uninitialize of
'upcall->put_actions' and free of uninitialized pointer.

This commit fixes the issue by making the caller not conduct
the uninitialize of the 'upcall' when there is error.

Found by inspection.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-upcall.c