This fixes a crash in lxc-autostart following the addition of
lxc_log_init as lxc-autostart doesn't use the name property.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
char *p;
int len, ret, use_dir;
+ if (!name)
+ return NULL;
+
#if USE_CONFIGPATH_LOGS
use_dir = 1;
#else
if (geteuid())
return 0;
+ /* if no name was specified, there nothing to do */
+ if (!name)
+ return 0;
+
ret = -1;
if (!lxcpath)