summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sandbox/src/sharedmem_ipc_server.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/sandbox/src/sharedmem_ipc_server.cc b/sandbox/src/sharedmem_ipc_server.cc
index 53286b7..18d7f52 100644
--- a/sandbox/src/sharedmem_ipc_server.cc
+++ b/sandbox/src/sharedmem_ipc_server.cc
@@ -129,20 +129,18 @@ bool SharedMemIPCServer::Init(void* shared_mem, size_t shared_size,
// Releases memory allocated for IPC arguments, if needed.
void ReleaseArgs(const IPCParams* ipc_params, void* args[kMaxIpcParams]) {
for (size_t i = 0; i < kMaxIpcParams; i++) {
- if (args[i]) {
- switch (ipc_params->args[i]) {
- case WCHAR_TYPE: {
- delete reinterpret_cast<std::wstring*>(args[i]);
- args[i] = NULL;
- break;
- }
- case INOUTPTR_TYPE: {
- delete reinterpret_cast<CountedBuffer*>(args[i]);
- args[i] = NULL;
- break;
- }
- default: break;
+ switch (ipc_params->args[i]) {
+ case WCHAR_TYPE: {
+ delete reinterpret_cast<std::wstring*>(args[i]);
+ args[i] = NULL;
+ break;
+ }
+ case INOUTPTR_TYPE: {
+ delete reinterpret_cast<CountedBuffer*>(args[i]);
+ args[i] = NULL;
+ break;
}
+ default: break;
}
}
}