Skip to content

Commit

Permalink
add memset stCoRoutine_t while co_create_env
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Dec 20, 2016
1 parent 808c5c6 commit d0a195d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions co_routine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ struct stCoRoutine_t *co_create_env( stCoRoutineEnv_t * env, const stCoRoutineAt
}

stCoRoutine_t *lp = (stCoRoutine_t*)malloc( sizeof(stCoRoutine_t) );

memset( lp,0,(long)(sizeof(stCoRoutine_t)));


lp->env = env;
Expand Down Expand Up @@ -1135,3 +1137,5 @@ stCoCondItem_t *co_cond_pop( stCoCond_t *link )
}
return p;
}


0 comments on commit d0a195d

Please sign in to comment.