From cd1996470aa62116183485c5a3bf5754d69e3457 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 28 Feb 2014 09:25:10 -0500 Subject: freedreno: fix null ptr in error path Signed-off-by: Rob Clark --- freedreno/freedreno_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'freedreno') diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c index 532e65bb..598bdfbc 100644 --- a/freedreno/freedreno_device.c +++ b/freedreno/freedreno_device.c @@ -117,7 +117,8 @@ struct fd_device * fd_device_new(int fd) struct fd_device * fd_device_new_dup(int fd) { struct fd_device *dev = fd_device_new(dup(fd)); - dev->closefd = 1; + if (dev) + dev->closefd = 1; return dev; } -- cgit v1.2.3