prefs: Fix leak when parsing empty pref string