On 03/04/2013 03:43 PM, Serge Hallyn wrote:
> Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>

Acked-by: Stéphane Graber <stgra...@ubuntu.com>

> ---
>  src/lxc/af_unix.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c
> index 2a34828..f6c65fb 100644
> --- a/src/lxc/af_unix.c
> +++ b/src/lxc/af_unix.c
> @@ -56,12 +56,16 @@ int lxc_af_unix_open(const char *path, int type, int 
> flags)
>              path[0]?strlen(path):sizeof(addr.sun_path));
>  
>       if (bind(fd, (struct sockaddr *)&addr, sizeof(addr))) {
> +             int tmp = errno;
>               close(fd);
> +             errno = tmp;
>               return -1;
>       }
>       
>       if (type == SOCK_STREAM && listen(fd, 100)) {
> +             int tmp = errno;
>               close(fd);
> +             errno = tmp;
>               return -1;
>       }
>  
> @@ -99,7 +103,9 @@ int lxc_af_unix_connect(const char *path)
>              path[0]?strlen(path):sizeof(addr.sun_path));
>  
>       if (connect(fd, (struct sockaddr *)&addr, sizeof(addr))) {
> +             int tmp = errno;
>               close(fd);
> +             errno = tmp;
>               return -1;
>       }
>  
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to