pass the correct object to cfg_obj_log

(cherry picked from commit 53a33f73)
42 jobs for 779-named-checkconf-crashes-in-parser-c-v9_12 in 18 minutes and 3 seconds (queued for 5 seconds)