From: "S.Çağlar Onur" <cag...@10ur.org>

Signed-off-by: S.Çağlar Onur <cag...@10ur.org>
---
 src/lxc/confile.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 8fe1541..16b8594 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -1422,11 +1422,13 @@ int lxc_config_readline(char *buffer, struct lxc_conf 
*conf)
 
 int lxc_config_read(const char *file, struct lxc_conf *conf)
 {
+       int ret = lxc_file_for_each_line(file, parse_line, conf);
+
        /* Catch only the top level config file name in the structure */
-       if( ! conf->rcfile ) {
+       if( ret == 0 && ! conf->rcfile ) {
                conf->rcfile = strdup( file );
        }
-       return lxc_file_for_each_line(file, parse_line, conf);
+       return ret;
 }
 
 int lxc_config_define_add(struct lxc_list *defines, char* arg)
-- 
1.7.10.4


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to