Skip to content

Commit 6fb308c

Browse files
authored
Merge pull request swiftlang#1397 from spevans/pr_sr_6449
2 parents 6d9ba3a + d72a6b5 commit 6fb308c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Foundation/FileManager.swift

+2
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ open class FileManager : NSObject {
440440
let stream = fts_open(ps, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, nil)
441441
ps.deinitialize(count: 2)
442442
ps.deallocate()
443+
fsRep.deallocate()
443444

444445
if stream != nil {
445446
defer {
@@ -1016,6 +1017,7 @@ extension FileManager {
10161017
_stream = fts_open(ps, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, nil)
10171018
ps.deinitialize(count: 2)
10181019
ps.deallocate()
1020+
fsRep.deallocate()
10191021
} else {
10201022
_rootError = _NSErrorWithErrno(ENOENT, reading: true, url: url)
10211023
}

TestFoundation/TestFileManager.swift

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class TestFileManager : XCTestCase {
155155
XCTAssertEqual(UInt8(bitPattern: result[0]), 0xE2)
156156
XCTAssertEqual(UInt8(bitPattern: result[1]), 0x98)
157157
XCTAssertEqual(UInt8(bitPattern: result[2]), 0x83)
158+
result.deallocate()
158159
}
159160

160161
func test_fileAttributes() {

0 commit comments

Comments
 (0)