From: Mathieu Trudel-Lapierre Subject: Don't crash/fail if there is no name for which to start logging. --- src/lxc/log.c | 7 +++++++ 1 file changed, 7 insertions(+) Index: b/src/lxc/log.c =================================================================== --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -191,6 +191,9 @@ static char *build_log_path(const char * char *p; int len, ret, use_dir; + if (!name) + return NULL; + #if USE_CONFIGPATH_LOGS use_dir = 1; #else @@ -326,6 +329,10 @@ extern int lxc_log_init(const char *name if (geteuid()) return 0; + /* if no name was specified, there nothing to do */ + if (!name) + return 0; + ret = -1; if (!lxcpath)