Bug 1159826 - ensure_copy_recursive() leaks directory streams. r=spohl, a=sledru
authorRobert Strong <robert.bugzilla@gmail.com>
Wed, 29 Apr 2015 17:27:33 -0700
changeset 260344 9edf93465d0d
parent 260343 742d81505cd3
child 260345 db6a2986c24d
push id757
push userryanvm@gmail.com
push date2015-05-01 19:40 +0000
treeherdermozilla-release@a1efc72ea226 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl, sledru
bugs1159826
milestone38.0
Bug 1159826 - ensure_copy_recursive() leaks directory streams. r=spohl, a=sledru
toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -792,17 +792,17 @@ static int ensure_copy_recursive(const N
       NS_tsnprintf(childPathDest, sizeof(childPathDest)/sizeof(childPathDest[0]),
                    NS_T("%s/%s"), dest, entry->d_name);
       rv = ensure_copy_recursive(childPath, childPathDest, skiplist);
       if (rv) {
         break;
       }
     }
   }
-
+  NS_tclosedir(dir);
   return rv;
 }
 
 // Renames the specified file to the new file specified. If the destination file
 // exists it is removed.
 static int rename_file(const NS_tchar *spath, const NS_tchar *dpath,
                        bool allowDirs = false)
 {