Fix DDList removeAll: not moving to the next node after removing the first. #137

Merged
merged 1 commit into from Apr 2, 2013

Projects

None yet

2 participants

@drodriguez
Contributor

-[DDList remove:allInstances:] includes a bug when invoked with allInstances:YES (as it is from -[DDList removeAll:]). The current implementation doesn’t advance to the next node in the list, iterating over the same node over and over, and freeing that node each time, which will cause a crash during runtime.

@drodriguez drodriguez Fix DDList removeAll: not moving to the next node after removing the …
…first.

Also includes a test in TestDDList that will crash with "malloc: *** error for
object 0x123456: pointer being freed was not allocated".
7fbb1d3
@robbiehanson robbiehanson merged commit 7662e11 into robbiehanson:master Apr 2, 2013
@drodriguez drodriguez deleted the drodriguez:fix-ddlist-removeall branch Apr 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment