settings: Don't leak credentials, when username or password is NULL
Quoting the commit message here:
While commit b17d0befe5e6d70466ac9d0110a6247499b92227 fixes a crash,
when the username or password is NULL, it accidentally leaks the string
with the credentials, which is in such case not NULL.
Use the autofree- and autoptr- helpers to get rid of any leaks here.
Fixes: b17d0befe5e6d70466ac9d0110a6247499b92227
Don't know why I forgot this in b17d0bef. Sorry.