retention data: small fix, prevent segfault

This could crash daemon while writing to retention.dat

Signed-off-by: Sven Velt <sven@velt.de>
Merge pull request #41 from wAmpIre/fix-retention-dat

retention data: small fix, prevent segfault