[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt-sandbox PATCH] sandbox-builder: Don't try g_file_enumerator_next_file if enumerator is NULL



On Mon, Mar 21, 2016 at 09:40:35AM +0000, Daniel P. Berrange wrote:
> On Sat, Mar 19, 2016 at 02:38:00PM +0100, Guido Günther wrote:
> > 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.
> > ---
> >  libvirt-sandbox/libvirt-sandbox-builder.c | 37 +++++++++++++++++--------------
> >  1 file changed, 20 insertions(+), 17 deletions(-)
> 
> ACK

Pushed. Thanks,
 -- Guido


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]