diff options
author | Toomas Soome <tsoome@me.com> | 2020-01-29 18:07:21 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-02-04 18:25:22 +0200 |
commit | 7484d76e78bc19298de9589214be103d65cf3989 (patch) | |
tree | 0ed148a387e6cff9f18748b499863575f6ae9c91 /usr/src/lib/libc/sparc | |
parent | b36afad7ffe84071c2c6831936cc1c524bd1ca90 (diff) | |
download | illumos-gate-7484d76e78bc19298de9589214be103d65cf3989.tar.gz |
12263 libc: NULL pointer errors (sparc)
Reviewed by: Matthias Scheler <mscheler@tintri.com>
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/libc/sparc')
-rw-r--r-- | usr/src/lib/libc/sparc/threads/machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/lib/libc/sparc/threads/machdep.c b/usr/src/lib/libc/sparc/threads/machdep.c index 85cf4facf9..12487363cb 100644 --- a/usr/src/lib/libc/sparc/threads/machdep.c +++ b/usr/src/lib/libc/sparc/threads/machdep.c @@ -61,7 +61,7 @@ setup_top_frame(void *stk, size_t stksize, ulwp_t *ulwp) int setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), - ulwp_t *ulwp, caddr_t stk, size_t stksize) + ulwp_t *ulwp, caddr_t stk, size_t stksize) { uintptr_t stack; @@ -72,7 +72,8 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), * Clear the top stack frame. * If this fails, pass the problem up to the application. */ - if ((stack = (uintptr_t)setup_top_frame(stk, stksize, ulwp)) == NULL) + stack = (uintptr_t)setup_top_frame(stk, stksize, ulwp); + if (stack == (uintptr_t)NULL) return (ENOMEM); /* fill in registers of interest */ |