Plug memory leak.
Merge topic 'target-sources-refactor' into next

d1a939e7 Plug memory leak.