Description: get_item(utsname): don't dereference utsname if it is NULL
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Forwarded: yes

Index: lxc/src/lxc/confile.c
===================================================================
--- lxc.orig/src/lxc/confile.c	2012-09-04 16:23:11.616585000 -0500
+++ lxc/src/lxc/confile.c	2012-09-04 17:12:59.428180025 -0500
@@ -1516,7 +1516,7 @@
 	else if (strncmp(key, "lxc.cgroup.", 11) == 0) // specific cgroup info
 		return lxc_get_cgroup_entry(c, retv, inlen, key + 11);
 	else if (strcmp(key, "lxc.utsname") == 0)
-		v = c->utsname->nodename;
+		v = c->utsname ? c->utsname->nodename : NULL;
 	else if (strcmp(key, "lxc.console") == 0)
 		v = c->console.path;
 	else if (strcmp(key, "lxc.rootfs.mount") == 0)
