On 13/03/2015 06:17, Shannon Zhao wrote:
>> > -    monitor_fdset_add_fd(dupfd, true, fdset_id, fd_opaque ? true : false,
>> > -                         fd_opaque, NULL);
>> > +    fdinfo = monitor_fdset_add_fd(dupfd, true, fdset_id, fd_opaque ? true 
>> > : false,
>> > +                                  fd_opaque, NULL);
>> > +    g_free(fdinfo);
>> >  
>> >      return 0;
>> >  }
>> > 
> Hi Paolo,
> 
> Not about the resource leak, but I think we should check fdinfo == NULL and 
> return -1.
> Then when error occurs, qemu will exit. Besides we should pass a meaningful 
> errp not NULL.
> So qemu can report the error reason. Right?

It cannot fail here, so another possibility could be to pass &error_abort.

Paolo

Reply via email to