fix a memory leak

@thanks Mathieu Westphal for the report and patch

Change-Id: Ibd210e5456955d10f21443e853c299f07731b7c9
Merge topic '0013322_plug_mem_leak' into master

9364db58 fix a memory leak