Plug memory leak in rectangle intersection