omx_core: fix heap corruption when unregistering component

Change-Id: Ie5c20e48f376054b1fe468274128e4c19c2ef3d1
diff --git a/exynos/multimedia/openmax/core/SEC_OMX_Component_Register.c b/exynos/multimedia/openmax/core/SEC_OMX_Component_Register.c
index 27a8805..8c274ca 100644
--- a/exynos/multimedia/openmax/core/SEC_OMX_Component_Register.c
+++ b/exynos/multimedia/openmax/core/SEC_OMX_Component_Register.c
@@ -141,8 +141,10 @@
 {
     OMX_ERRORTYPE ret = OMX_ErrorNone;
 
-    SEC_OSAL_Memset(componentList, 0, sizeof(SEC_OMX_COMPONENT_REGLIST) * MAX_OMX_COMPONENT_NUM);
-    SEC_OSAL_Free(componentList);
+    if (componentList != NULL) {
+        SEC_OSAL_Memset(componentList, 0, sizeof(SEC_OMX_COMPONENT_REGLIST) * MAX_OMX_COMPONENT_NUM);
+        SEC_OSAL_Free(componentList);
+    }
 
 EXIT:
     return ret;