get rid of _GNU_SOURCE, check for malloc