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

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Dec 17 02:20:18 PST 2012


On 12/13/2012 02:59 PM, Michal Sekletar wrote:
> ---
>   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;
>           }
Applied both.

Zbyszek



More information about the systemd-devel mailing list