Skip to content

Commit

Permalink
tools: work around for double link_del
Browse files Browse the repository at this point in the history
  • Loading branch information
thehajime committed May 1, 2015
1 parent 76a6423 commit 7235e6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ static void *nuse_task_start_trampoline(void *context)
callback(callback_context);

/* nuse_fiber_free (task->private); */
list_del(&task->head);
if (task->head.prev != LIST_POISON2)
list_del(&task->head);
free(task);

return ctx;
Expand Down Expand Up @@ -239,7 +240,8 @@ void nuse_event_cancel(struct SimKernel *kernel, void *event)

nuse_fiber_stop(g_exported->task_get_private(task->s_task));
/* nuse_fiber_free (task->private); */
list_del(&task->head);
if (task->head.prev != LIST_POISON2)
list_del(&task->head);
}

void nuse_task_wait(struct SimKernel *kernel)
Expand Down

0 comments on commit 7235e6f

Please sign in to comment.