Fixed bug in list_assign_value

Memory for string was not allocated before copying the value.