cryptsetup-generator: add a helper utility to create symlinks
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 10 Jul 2017 03:31:47 +0000 (23:31 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 10 Jul 2017 04:16:36 +0000 (00:16 -0400)
commitb559616f2321643c5194b474d39a722cefaf6059
treed4cdc4049476a734416910813b192d55b6c0703c
parente1bc3004ab8ef0266c71516a28e92e3ead08fe5a
cryptsetup-generator: add a helper utility to create symlinks

It seems that there's a common pattern among the various generators. Let's add
a helper function for it and make use of it in cryptsetup-generator.

This fixes a bunch of theoretical memleaks in error paths, since *to wasn't
generally freed properly. Not thath it matters.
src/cryptsetup/cryptsetup-generator.c
src/shared/generator.c
src/shared/generator.h