retention data: small fix, prevent segfault

This could crash daemon while writing to retention.dat

Signed-off-by: Sven Velt <sven@velt.de>