background: Fix a memory leak when add_single_file failed

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