Permalink
Browse files

return -1 if data is NULL

  • Loading branch information...
1 parent ff2652f commit 2f0f720d152cdc9c24812a7d940adec3ce747558 Jeremy R. Fishman committed Feb 15, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/cc/chunk/ClientSM.cc
View
@@ -257,6 +257,9 @@ ClientSM::HandleRequest(int code, void* data)
case EVENT_CMD_DONE: {
// An op finished execution. Send response back in FIFO
assert(data);
+ if (!data) {
+ return -1;
+ }
KfsOp* op = reinterpret_cast<KfsOp*>(data);
gChunkServer.OpFinished();
op->done = true;

0 comments on commit 2f0f720

Please sign in to comment.