memory leak when alloca not available