]> xenbits.xensource.com Git - unikraft/libs/libgo.git/commit
Fix error handling with uk_posix_memalign()
authorSimon Kuenzer <simon.kuenzer@neclab.eu>
Sat, 8 Feb 2020 10:47:14 +0000 (11:47 +0100)
committerSimon Kuenzer <simon.kuenzer@neclab.eu>
Sat, 8 Feb 2020 16:43:19 +0000 (17:43 +0100)
commitd8d97e7d02448153ee98510468f5ce8e7ab54f7a
tree676f8bb768cc6e33f6b409858207e47614b5bdb7
parent7c32bcccffc4c75c517e99d4b2d3a4b907ab3669
Fix error handling with uk_posix_memalign()

In the cases of failed allocation, `uk_posix_memalign()` is returning
an errno number but does not change `memptr`. Instead of checking
`memptr` being NULL, we test failures with `uk_posix_memalign()`'s
return codes.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
glue.c