Fixed bug in resize_stack_size

Changed so stack_size won't be incorrect if malloc fails