diff --git a/src/network/networkd-radv.c b/src/network/networkd-radv.c index 464e636876..14927b0439 100644 --- a/src/network/networkd-radv.c +++ b/src/network/networkd-radv.c @@ -104,7 +104,7 @@ void prefix_free(Prefix *prefix) { } int prefix_new(Prefix **ret) { - Prefix *prefix = NULL; + _cleanup_(prefix_freep) Prefix *prefix = NULL; prefix = new0(Prefix, 1); if (!prefix)