Fix a memory leak

https://bugs.freedesktop.org/show_bug.cgi?id=72426