From: Ben Pfaff Date: Wed, 27 May 2009 16:09:54 +0000 (-0700) Subject: datapath: Fix read of uninitialized data. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=583fce191c99609b61b88dd3ccb71354a8a053bf;p=openvswitch datapath: Fix read of uninitialized data. Control jumps to the error_free_flow label to free a flow allocated with kmem_cache_alloc(), but the sf_acts member of that flow has never been initialized and thus flow_free() will pass uninitialized data to kfree(). Fix it by just freeing the flow itself. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index d4dac856..e6484ac7 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -932,7 +932,7 @@ retry: return 0; error_free_flow: - flow_free(flow); + kmem_cache_free(flow_cache, flow); error: return error; }