diff options
author | Sejun Park <sejun79.park@samsung.com> | 2017-09-15 18:26:20 +0900 |
---|---|---|
committer | Sejun Park <sejun79.park@samsung.com> | 2017-09-18 14:18:43 +0900 |
commit | 2e96da43c261331261960979a330ef6ab4a98842 (patch) | |
tree | 71ef788b174d755e31fab95a50cede076d4c95fe | |
parent | d68c9f290e5bab4a5844cf3179089b1b29ce5c0f (diff) | |
download | libomxil-e7270-v4l2-2e96da43c261331261960979a330ef6ab4a98842.tar.gz libomxil-e7270-v4l2-2e96da43c261331261960979a330ef6ab4a98842.tar.bz2 libomxil-e7270-v4l2-2e96da43c261331261960979a330ef6ab4a98842.zip |
fixed svace issue
Change-Id: Ib40e0c3689b25ec5be5cc34e7dd0c8c4963af80b
-rwxr-xr-x | exynos/libv4l2/exynos_mc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/exynos/libv4l2/exynos_mc.c b/exynos/libv4l2/exynos_mc.c index ee3c78f..ca2a709 100755 --- a/exynos/libv4l2/exynos_mc.c +++ b/exynos/libv4l2/exynos_mc.c @@ -194,10 +194,6 @@ static int __media_get_devname_sysfs(struct media_entity *entity) static int __media_get_media_fd(const char *filename, struct media_device *media) { - ssize_t num; - int media_node; - char *ptr; - ALOGD("%s: %s", __func__, filename); media->fd = open(filename, O_RDWR, 0); @@ -224,6 +220,11 @@ static int __media_enum_entities(struct media_device *media) size = (media->entities_count + 1) * sizeof(*media->entities); media->entities = (struct media_entity*)realloc(media->entities, size); + if (media->entities == NULL) { + ret = -ENOMEM; + break; + } + entity = &media->entities[media->entities_count]; memset(entity, 0, sizeof(*entity)); entity->fd = -1; |