Bring collect.c and udevadm-hwdb.c in line with upstream

This brings these two files in line with upstream's commit:

  ef89eef77ee098a6828169a6d0d74128e236bcbd
  udev: fix two trivial memleaks in error path
  Based-on-a-patch-by: Ian Stakenvicius <axs@gentoo.org>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>