From 589ce06a58b49cc658ea0bba90b1e57668886fde Mon Sep 17 00:00:00 2001 From: Yuan Liu Date: Tue, 15 Nov 2016 13:04:35 -0800 Subject: [PATCH] lkl: Fix tls_alloc failure in nt-host Signed-off-by: Yuan Liu --- tools/lkl/lib/nt-host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lkl/lib/nt-host.c b/tools/lkl/lib/nt-host.c index f42cf884e2563b..a10bc093448e7c 100644 --- a/tools/lkl/lib/nt-host.c +++ b/tools/lkl/lib/nt-host.c @@ -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)