socket-util: added check of return value

This commit is contained in:
Michal Sekletar 2012-12-13 14:59:40 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent c9c7aef24f
commit 8520cfa584
1 changed files with 2 additions and 0 deletions

View File

@ -369,6 +369,8 @@ int socket_address_print(const SocketAddress *a, char **p) {
if (r < 0)
return r;
r = asprintf(p, "%s %u", sfamily, a->sockaddr.nl.nl_groups);
if (r < 0)
return -ENOMEM;
return 0;
}