src: fix use after free

Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=990

Signed-off-by: Christopher Horler <cshorler@googlemail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>