Title: [121752] trunk/Source/WebCore
Revision
121752
Author
[email protected]
Date
2012-07-03 03:04:12 -0700 (Tue, 03 Jul 2012)

Log Message

[EFL] [WK2] Don't call eina_iterator_free() if iterator is NULL
https://bugs.webkit.org/show_bug.cgi?id=90076

Patch by Sudarsana Nagineni <[email protected]> on 2012-07-03
Reviewed by Kenneth Rohde Christiansen.

Add a null check to prevent calling eina_iterator_free() when
iterator is NULL.

No new tests. This patch doesn't change behavior.

* platform/efl/FileSystemEfl.cpp:
(WebCore::listDirectory): Early return when iterator is NULL.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121751 => 121752)


--- trunk/Source/WebCore/ChangeLog	2012-07-03 09:49:46 UTC (rev 121751)
+++ trunk/Source/WebCore/ChangeLog	2012-07-03 10:04:12 UTC (rev 121752)
@@ -1,3 +1,18 @@
+2012-07-03  Sudarsana Nagineni  <[email protected]>
+
+        [EFL] [WK2] Don't call eina_iterator_free() if iterator is NULL
+        https://bugs.webkit.org/show_bug.cgi?id=90076
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add a null check to prevent calling eina_iterator_free() when
+        iterator is NULL.
+
+        No new tests. This patch doesn't change behavior.
+
+        * platform/efl/FileSystemEfl.cpp:
+        (WebCore::listDirectory): Early return when iterator is NULL.
+
 2012-07-03  Alexander Pavlov  <[email protected]>
 
         Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text

Modified: trunk/Source/WebCore/platform/efl/FileSystemEfl.cpp (121751 => 121752)


--- trunk/Source/WebCore/platform/efl/FileSystemEfl.cpp	2012-07-03 09:49:46 UTC (rev 121751)
+++ trunk/Source/WebCore/platform/efl/FileSystemEfl.cpp	2012-07-03 10:04:12 UTC (rev 121752)
@@ -91,6 +91,12 @@
     const char *f_name;
 
     Eina_Iterator* it = eina_file_ls(path.utf8().data());
+    // FIXME: Early return if the iterator is null to avoid error messages from eina_iterator_free().
+    // This check can be removed once the magic check on _free() removed in Eina.
+    // http://www.mail-archive.com/[email protected]/msg42944.html
+    if (!it)
+        return matchingEntries;
+
     EINA_ITERATOR_FOREACH(it, f_name) {
         if (!fnmatch(cfilter.data(), f_name, 0))
             matchingEntries.append(String::fromUTF8(f_name));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to