From 6b6ed3e3eb629a822447e1266a137b8ff852aebf Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 31 Oct 2012 21:44:54 +0100 Subject: shared/socket-util: kill gcc warning about uninitialized variable The warning was invalid, but distracting. --- src/shared/socket-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/shared') diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index 8bc3729857..49ea75880d 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -363,13 +363,12 @@ int socket_address_print(const SocketAddress *a, char **p) { } case AF_NETLINK: { - char *sfamily; + char _cleanup_free_ *sfamily = NULL; r = netlink_family_to_string_alloc(a->protocol, &sfamily); if (r < 0) return r; r = asprintf(p, "%s %u", sfamily, a->sockaddr.nl.nl_groups); - free(sfamily); return 0; } -- cgit v1.2.3-54-g00ecf