• M
    qemu: cleanup error checking on agent replies · 5b3492fa
    Martin Kletzander 提交于
    On all the places where qemuAgentComand() was called, we did a check
    for errors in the reply.  Unfortunately, some of the places called
    qemuAgentCheckError() without checking for non-null reply which might
    have resulted in a crash.
    
    So this patch makes the error-checking part of qemuAgentCommand()
    itself, which:
    
     a) makes it look better,
    
     b) makes the check mandatory and, most importantly,
    
     c) checks for the errors if and only if it is appropriate.
    
    This actually fixes a potential crashers when qemuAgentComand()
    returned 0, but reply was NULL.  Having said that, it *should* fix the
    following bug:
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1058149Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
    5b3492fa
qemu_agent.c 45.6 KB