(popup_get_selection): Use xmalloc instead of malloc.