diff options
author | Sejun Park <sejun79.park@samsung.com> | 2017-09-15 18:25:02 +0900 |
---|---|---|
committer | Sejun Park <sejun79.park@samsung.com> | 2017-09-18 14:16:30 +0900 |
commit | dbdcb66ed63a6f770944c09afa455bb82fc1393e (patch) | |
tree | 20ebc3b7322f09b2fa8ef08e78655b8637dda3e2 | |
parent | 8ef085211486a4b4198a3c30774819ab9b141c45 (diff) | |
download | libexynos-common-dbdcb66ed63a6f770944c09afa455bb82fc1393e.tar.gz libexynos-common-dbdcb66ed63a6f770944c09afa455bb82fc1393e.tar.bz2 libexynos-common-dbdcb66ed63a6f770944c09afa455bb82fc1393e.zip |
fixed svace issuesubmit/tizen/20180115.022856submit/tizen/20170918.101803accepted/tizen/unified/20180115.135700
Change-Id: Ic3328b6accdf0760c748783e040aa907fcddc109
-rwxr-xr-x | libv4l2/exynos_mc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libv4l2/exynos_mc.c b/libv4l2/exynos_mc.c index 4c12b1f..50aeea8 100755 --- a/libv4l2/exynos_mc.c +++ b/libv4l2/exynos_mc.c @@ -191,10 +191,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); @@ -221,6 +217,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; |