minor malloc fix

using std=c99 way to malloc