Skip to content

Commit

Permalink
Fix NPE in UnsafeInMemorySorter.free()
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonwang committed Jan 7, 2016
1 parent 174e72c commit 2bc7827
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ public UnsafeInMemorySorter(
* Free the memory used by pointer array.
*/
public void free() {
consumer.freeArray(array);
array = null;
if (consumer != null) {
consumer.freeArray(array);
array = null;
}
}

public void reset() {
Expand Down

0 comments on commit 2bc7827

Please sign in to comment.