Skip to content

Commit

Permalink
datapath-windows: Removed duplicate checking of previous dump state
Browse files Browse the repository at this point in the history
Removed the check for previous dump state before calling FreeUserDumpState
as the check is also performed in the latter function.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
svinturis authored and blp committed Nov 24, 2014
1 parent aa09ab5 commit 21b83c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datapath-windows/ovsext/Datapath.c
Expand Up @@ -783,7 +783,7 @@ OvsDeviceControl(PDEVICE_OBJECT deviceObject,
* state in the instance to indicate the command that started the dump
* operation. The state can setup 'ovsMsgReadOp' appropriately. Note
* that 'ovsMsgReadOp' is needed only in this function to call into the
* appropraite handler. The handler itself can access the state in the
* appropriate handler. The handler itself can access the state in the
* instance.
*
* In the absence of a dump start, return 0 bytes.
Expand Down Expand Up @@ -1350,9 +1350,7 @@ OvsSetupDumpStart(POVS_USER_PARAMS_CONTEXT usrParamsCtx)
* This operation should be setting up the dump state. If there's any
* previous state, clear it up so as to set it up afresh.
*/
if (instance->dumpState.ovsMsg != NULL) {
FreeUserDumpState(instance);
}
FreeUserDumpState(instance);

return InitUserDumpState(instance, msgIn);
}
Expand Down

0 comments on commit 21b83c6

Please sign in to comment.