I was trying to fix a clang `scan-build` error that jlebon ended up tracking down in https://github.com/ostreedev/ostree/pull/1939/commits/9344de1ce1e8c185e01988277606ba1ed7f9d16b But in the process of tracing through this I found it way easier to read as "new style" code, so this also ports the code. I added a `g_assert()` in there too to help assert that `g_key_file_get_value` won't leak in the error path.