ObjFW  Check-in [ea9079b62b]

Overview
Comment:OFTarArchive: Fix a memory leak
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ea9079b62b0fc6511cc08fe4da8aadf57afebaa8d667d73bc2873982ce0e2b93
User & Date: js on 2024-04-02 01:33:32
Other Links: manifest | tags
Context
2024-04-02
02:22
OFLocale: Support automatic initialization check-in: e7a8f3d462 user: js tags: trunk
01:33
OFTarArchive: Fix a memory leak Closed-Leaf check-in: 9c7610b3b7 user: js tags: 1.0
01:33
OFTarArchive: Fix a memory leak check-in: ea9079b62b user: js tags: trunk
2024-04-01
21:07
Fix objfw-embed on QNX check-in: 5e128fd25e user: js tags: trunk
Changes

Modified src/OFTarArchive.m from [23e0c065c8] to [4064e91319].

321
322
323
324
325
326
327


328
329
330
331
332
333
334
		[self close];

	[_entry release];

	if (_archive->_lastReturnedStream == self)
		_archive->_lastReturnedStream = nil;



	[super dealloc];
}

- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length
{
	size_t ret;








>
>







321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
		[self close];

	[_entry release];

	if (_archive->_lastReturnedStream == self)
		_archive->_lastReturnedStream = nil;

	[_archive release];

	[super dealloc];
}

- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length
{
	size_t ret;

460
461
462
463
464
465
466


467
468
469
470
471
472
473
	if (_stream != nil)
		[self close];

	[_entry release];

	if (_archive->_lastReturnedStream == self)
		_archive->_lastReturnedStream = nil;



	[super dealloc];
}

- (size_t)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length
{
	if (_stream == nil)







>
>







462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
	if (_stream != nil)
		[self close];

	[_entry release];

	if (_archive->_lastReturnedStream == self)
		_archive->_lastReturnedStream = nil;

	[_archive release];

	[super dealloc];
}

- (size_t)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length
{
	if (_stream == nil)