array: avoid duplicate code to reallocate
array: avoid duplicate code to reallocate

lucasdemarchi/kmod,Distrotech/kmod,Distrotech/kmod,lpereira/kmod,Distrotech/kmod,pmmccorm/kmod,lpereira/kmod,lucasdemarchi/kmod,lpereira/kmod,pmmccorm/kmod,lucasdemarchi/kmod,pmmccorm/kmod