gpio: fix memory leak

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Merge pull request #12 from yegorich/gpio

gpio: fix memory leak