Fixed a potential null pointer reference bug.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Tue, 19 Mar 2013 12:41:49 +0000 (20:41 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 10 Apr 2013 06:52:33 +0000 (14:52 +0800)
commitcb44b60e6e0def188a99e2112aa9b9bb290f6d59
tree86077c1bac47fd5b1de79fce73477dd9f0b1d1bb
parentf70179174d07bd5f1a582664f294438ed4362b4e
Fixed a potential null pointer reference bug.

When we failed to create a dri2 connection, we jump to the error out
path, and the driver_name may be null pointer, before set it to null,
we need to check it first.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
src/x11/dricommon.c