RESOLVED FIXED 98384
[WK2][GTK][EFL] standard_output returned by g_spawn_sync must be freed
https://bugs.webkit.org/show_bug.cgi?id=98384
Summary [WK2][GTK][EFL] standard_output returned by g_spawn_sync must be freed
Sudarsana Nagineni (babu)
Reported 2012-10-04 01:06:57 PDT
standard_output returned by g_spawn_sync() leaks here if we return early after evaluating the exit status. http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp#L68 64 if (!g_spawn_sync(0, argv, 0, G_SPAWN_STDERR_TO_DEV_NULL, 0, 0, &stdOut, 0, &status, 0)) 65 return false; 66 67 if (!WIFEXITED(status) || WEXITSTATUS(status) != EXIT_SUCCESS) 68 return false;
Attachments
Patch (1.53 KB, patch)
2012-10-04 01:11 PDT, Sudarsana Nagineni (babu)
no flags
Patch (1.50 KB, patch)
2012-10-05 01:20 PDT, Sudarsana Nagineni (babu)
no flags
Sudarsana Nagineni (babu)
Comment 1 2012-10-04 01:11:20 PDT
Gyuyoung Kim
Comment 2 2012-10-05 00:50:12 PDT
Comment on attachment 167044 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167044&action=review > Source/WebKit2/ChangeLog:3 > + [WK2] [EFL] standard_output returned by g_spawn_sync must be freed This is not EFL port patch. Please remove [EFL] keyword. > Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:68 > + free(stdOut); Don't we need to check if stdOut is null once more?
Sudarsana Nagineni (babu)
Comment 3 2012-10-05 01:12:55 PDT
Comment on attachment 167044 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167044&action=review >> Source/WebKit2/ChangeLog:3 >> + [WK2] [EFL] standard_output returned by g_spawn_sync must be freed > > This is not EFL port patch. Please remove [EFL] keyword. This code is under GTK/EFL ifdef guards. I think make sense to add GTK too, instead of removing EFL. >> Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:68 >> + free(stdOut); > > Don't we need to check if stdOut is null once more? free is NULL-safe, no need to check.
Sudarsana Nagineni (babu)
Comment 4 2012-10-05 01:20:06 PDT
Created attachment 167278 [details] Patch Updated changelog.
Gyuyoung Kim
Comment 5 2012-10-05 01:24:52 PDT
Comment on attachment 167278 [details] Patch Looks make sense.
WebKit Review Bot
Comment 6 2012-10-05 02:19:25 PDT
Comment on attachment 167278 [details] Patch Clearing flags on attachment: 167278 Committed r130490: <http://trac.webkit.org/changeset/130490>
WebKit Review Bot
Comment 7 2012-10-05 02:19:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.