Skip to content

Commit

Permalink
Merge pull request torvalds#263 from liuyuan10/fixcb
Browse files Browse the repository at this point in the history
lkl: Fix tls_alloc failure in nt-host
  • Loading branch information
liuyuan10 authored Nov 16, 2016
2 parents c011d35 + 589ce06 commit 379f265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/lkl/lib/nt-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ static struct lkl_tls_key *tls_alloc(void (*destructor)(void *))
ret->key = FlsAlloc((PFLS_CALLBACK_FUNCTION)destructor);
if (ret->key == TLS_OUT_OF_INDEXES) {
free(ret);
return -1;
return NULL;
}
return 0;
return ret;
}

static void tls_free(struct lkl_tls_key *key)
Expand Down

0 comments on commit 379f265

Please sign in to comment.