[systemd-devel] [PATCH 2/2] socket-util: added check of return value

Michal Sekletar msekleta at redhat.com
Thu Dec 13 05:59:40 PST 2012


---
 src/shared/socket-util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c
index 49ea758..42ea545 100644
--- a/src/shared/socket-util.c
+++ b/src/shared/socket-util.c
@@ -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;
         }
-- 
1.7.11.7



More information about the systemd-devel mailing list