From f96f5d54b8e40b6fbd17e01234dee495de4b11c8 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 7 Mar 2021 10:31:26 +0900 Subject: [PATCH] socket-util: initialize variable with cleanup attribute Follow-up for 83e03c4fc23dae0cbb3fd4e7c2f9ef533fc26160. Fixes CID#1448460. --- src/basic/socket-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index fc90161745..8402e79c31 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -298,7 +298,7 @@ bool socket_ipv6_is_supported(void) { } bool socket_ipv6_is_enabled(void) { - _cleanup_free_ char *v; + _cleanup_free_ char *v = NULL; int r; /* Much like socket_ipv6_is_supported(), but also checks that the sysctl that disables IPv6 on all