Skip to content

Commit 379f265

Browse files
authored
Merge pull request torvalds#263 from liuyuan10/fixcb
lkl: Fix tls_alloc failure in nt-host
2 parents c011d35 + 589ce06 commit 379f265

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/lkl/lib/nt-host.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ static struct lkl_tls_key *tls_alloc(void (*destructor)(void *))
133133
ret->key = FlsAlloc((PFLS_CALLBACK_FUNCTION)destructor);
134134
if (ret->key == TLS_OUT_OF_INDEXES) {
135135
free(ret);
136-
return -1;
136+
return NULL;
137137
}
138-
return 0;
138+
return ret;
139139
}
140140

141141
static void tls_free(struct lkl_tls_key *key)

0 commit comments

Comments
 (0)