https://bugs.webkit.org/show_bug.cgi?id=90076
Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> 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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121752
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-03 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [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 <apavlov@chromium.org>
Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text
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/enlightenment-devel@lists.sourceforge.net/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));