OK.

I personally would prefer not to duplicate code. So maybe you should put those xmalloc_unsiged/xrealloc_unsigned in lib-common in order to be able to use them here and in postlicyd.