summaryrefslogtreecommitdiffstats
path: root/common/bthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bthread.c')
-rw-r--r--common/bthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/bthread.c b/common/bthread.c
index 46e6987149..d40c0b0f9e 100644
--- a/common/bthread.c
+++ b/common/bthread.c
@@ -70,6 +70,8 @@ bool bthread_is_main(struct bthread *bthread)
static void bthread_free(struct bthread *bthread)
{
+ if (!bthread)
+ return;
free(bthread->stack);
free(bthread->name);
free(bthread);