Fix Prevent issue
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 25 Sep 2013 07:32:19 +0000 (09:32 +0200)
committerSoo-Hyun Choi <sh9.choi@samsung.com>
Wed, 25 Sep 2013 15:03:44 +0000 (00:03 +0900)
[Issue#]   CID: 30993, 30994, LINUXWRT-906
[Bug]      Prevent issues.
[Cause]    Dereference of null pointer
[Solution] Small fixes

[Verification] Build repository.

Change-Id: I50a21a13f31593330ca5893ff5412ed392773599

src/jobs/widget_install/widget_unzip.cpp

index 100a748..60bc464 100644 (file)
@@ -162,7 +162,7 @@ bool WidgetUnzip::isDRMPackage(const std::string &source)
         (dlsym(pHandle, "drm_oem_sapps_is_drm_file"));
     pErrorMsg = dlerror();
     if ((pErrorMsg != NULL) || (drm_oem_sapps_is_drm_file == NULL)) {
-        _E("dlopen failed : %s [%s]", source.c_str(), dlerror());
+        _E("dlopen failed : %s [%s]", source.c_str(), pErrorMsg);
         dlclose(pHandle);
         return false;
     }
@@ -198,7 +198,7 @@ bool WidgetUnzip::decryptDRMPackage(const std::string &source, const std::string
         (dlsym(pHandle, "drm_oem_sapps_decrypt_package"));
     pErrorMsg = dlerror();
     if ((pErrorMsg != NULL) || (drm_oem_sapps_decrypt_package == NULL)) {
-        _E("dlopen failed : %s [%s]", source.c_str(), dlerror());
+        _E("dlopen failed : %s [%s]", source.c_str(), pErrorMsg);
         dlclose(pHandle);
         return false;
     }