fix year duplication

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix memory leak

Signed-off-by: Mattias Andrée <maandree@operamail.com>