fix to segfault introduced by pull request #81

reported by Antonio Querubin on ossec-dev

I could reproduce the segfault with with ossec-analysisd -t -d -d and fixed it