core: Fix a small memory leak in a date parsing function

https://bugzilla.gnome.org/show_bug.cgi?id=731949