instance_config_move_strdup() previously returned too early in case of
a value being previously unassigned.
Fixes: 153820c ("instance: fix pidfile and seccomp attributes double free")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
static void
instance_config_move_strdup(char **dst, char *src)
{
static void
instance_config_move_strdup(char **dst, char *src)
{
- if (!*dst)
- return;
-
- free(*dst);
- *dst = NULL;
+ if (*dst) {
+ free(*dst);
+ *dst = NULL;
+ }