Fix error handling in ct_config.

Check the result of the strdup, not the thing we strduped. Error from
cppcheck via dhill