Better handle out-of-memory reading configuration
If we hit out-of-memory (strdup() failures) while reading the
configuration, don't crash (static analysis). In some cases,
this means we proceed with garbage data until the copy_config()
function sanity-checks its input and output.