Fix for use after free
authorPrzemyslaw Ciezkowski <p.ciezkowski@samsung.com>
Tue, 6 Nov 2012 14:47:35 +0000 (15:47 +0100)
committerGerrit Code Review <gerrit2@kim11>
Mon, 19 Nov 2012 10:20:14 +0000 (19:20 +0900)
[Issue#] N/A
[Bug] Directory structure is being passed to log message when
closedir fails.
[Cause] N/A
[Solution] It is better to pass directory path.
[Verification] Call wrt_reset_all.sh and run plugin installation.

Change-Id: Ib0e89991e8fc4b9a3be10172c5adf788c61a93fe

src/plugins-installer/wrt-installer/wrt_installer_api.cpp

index 2ef0353..c6df7d8 100755 (executable)
@@ -508,7 +508,7 @@ extern "C"
             }
 
             if (-1 == TEMP_FAILURE_RETRY(closedir(dir))) {
-                LogError("Failed to close dir: " << dir);
+                LogError("Failed to close dir: " << PLUGIN_PATH);
             }
 
             if (0 != unlink(installRequest.c_str())) {