The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1739

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Shukui Yang <[email protected]>
From e58e6e11efeb79d5c1f4e6fed4d2643dfc78f575 Mon Sep 17 00:00:00 2001
From: Shukui Yang <[email protected]>
Date: Fri, 11 Aug 2017 17:12:24 +0800
Subject: [PATCH] Fix mem leak with realpath

Signed-off-by: Shukui Yang <[email protected]>
---
 src/lxc/tools/lxc_start.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c
index ef45ffb08..20d5b0364 100644
--- a/src/lxc/tools/lxc_start.c
+++ b/src/lxc/tools/lxc_start.c
@@ -80,16 +80,11 @@ static int ensure_path(char **confpath, const char *path)
                        goto err;
                }
 
-               *confpath = strdup(fullpath);
-               if (!*confpath) {
-                       ERROR("failed to dup string '%s'", fullpath);
-                       goto err;
-               }
+               *confpath = fullpath;
        }
        err = EXIT_SUCCESS;
 
 err:
-       free(fullpath);
        return err;
 }
 
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to