xbps: merge another patch from master to fix a user-after-free.