Skip to content

Commit

Permalink
Update Thread.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
zqkkqz committed Aug 3, 2015
1 parent 3c36b66 commit a084f61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/Thread.cc
Expand Up @@ -136,9 +136,11 @@ int Thread::try_create(size_t stacksize)
r = pthread_create(&thread_id, thread_attr, _entry_func, (void*)this);
restore_sigset(&old_sigset);

if (thread_attr)
if (thread_attr){
pthread_attr_destroy(thread_attr);
free(thread_attr);
}

return r;
}

Expand Down

0 comments on commit a084f61

Please sign in to comment.