diff options
author | Rob Clark <robclark@freedesktop.org> | 2014-02-28 09:25:10 -0500 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2014-03-05 09:40:19 -0500 |
commit | cd1996470aa62116183485c5a3bf5754d69e3457 (patch) | |
tree | 48b874b0fa163b727c2c14f6a4c824f3cdd68802 /freedreno | |
parent | 5a3324638b3abb19b30e91ea4dfdd6e1764d6340 (diff) |
freedreno: fix null ptr in error path
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno')
-rw-r--r-- | freedreno/freedreno_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |