chiark / gitweb /
socket-util: added check of return value
authorMichal Sekletar <msekleta@redhat.com>
Thu, 13 Dec 2012 13:59:40 +0000 (14:59 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Dec 2012 10:41:31 +0000 (11:41 +0100)
src/shared/socket-util.c

index 49ea758..42ea545 100644 (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;
         }