diff options
author | Mariusz Glebocki <mglebocki@antmicro.com> | 2014-10-09 16:28:12 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2014-10-28 14:42:56 +0100 |
commit | 169a233f4779a7617179f825723d38f9832238f8 (patch) | |
tree | b36f64af4c7930871b22a38ed9df95654e8505fc | |
parent | 0625688b466897845df130df7d66cb9ce8c369bb (diff) |
video: tegra: nvmap: prevent null pointer dereferenceColibri_T30_LinuxImageV2.3Beta3_20141031Colibri_T20_LinuxImageV2.3Beta3_20141031Apalis_T30_LinuxImageV2.3Beta3_20141031
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index 3ea7bd2ea797..40a9e5b9f2ed 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -236,8 +236,9 @@ struct nvmap_handle *nvmap_get_handle_id(struct nvmap_client *client, clients only if the owner is "videobuf2-dma-nvmap", which is a V4L2 capture kernel module. This handle can be accessed by the "user" client for rendering */ - if (!strcmp(((struct nvmap_handle *)id)->owner->name, - "videobuf2-dma-nvmap")) + if (((struct nvmap_handle *)id)->owner && + !strcmp(((struct nvmap_handle *)id)->owner->name, + "videobuf2-dma-nvmap")) client = ((struct nvmap_handle *)id)->owner; nvmap_ref_lock(client); |