Fixing librpm API usage leaks