summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/socket-util.c3
1 files changed, 1 insertions, 2 deletions
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;
}