[libfko] fix memory leak in fko_encode_spa_data() caught by Coverity
[server] fix IP subnet mask CIDR range restriction bug found by Coverity