lifecycle: Don't leak allocated memory.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-10-06 03:26:14 +02:00
parent 1a2298a759
commit 5302bee850

View file

@ -231,6 +231,10 @@ build_environment(char **envp[], const struct lif_execute_opts *opts, const stru
lif_environment_push(envp, "IF_ADDRESSES", addresses);
if (gateways != NULL)
lif_environment_push(envp, "IF_GATEWAYS", gateways);
/* Clean up */
free (addresses);
free (gateways);
}
bool