rpm: fix memory leak

Closes rhbz#1016780.

Signed-off-by: Martin Milata <mmilata@redhat.com>