-
Guido Günther authored
Passing the NULL enumerator to g_file_enumerator_next_file makes us overwrite error information otherwise: $ sudo bin/virt-sandbox-service create --unitfile foo.service foo (process:18529): GLib-GIO-CRITICAL **: g_file_enumerator_next_file: assertion 'G_IS_FILE_ENUMERATOR (enumerator)' failed (process:18529): GLib-GIO-CRITICAL **: g_file_enumerator_close: assertion 'G_IS_FILE_ENUMERATOR (enumerator)' failed bin/virt-sandbox-service:318: Warning: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: Error removing file: No such file or directory context.undefine() bin/virt-sandbox-service:318: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed context.undefine() Cleanup failed: g-io-error-quark: No such file or directory (1) bin/virt-sandbox-service: g-io-error-quark: No such file or directory (1) also make sure we don't unref NULL in this case.
70ac1bb5