Skip to content
  • Zhenzhong Duan's avatar
    38f71349
    vl: Fix an assert failure in error path · 38f71349
    Zhenzhong Duan authored
    
    
    Based on the description of error_setg(), the local variable err in
    qemu_maybe_daemonize() should be initialized to NULL.
    
    Without fix, the uninitialized *errp triggers assert failure which
    doesn't show much valuable information.
    
    Before the fix:
    qemu-system-x86_64: ../util/error.c:59: error_setv: Assertion `*errp == NULL' failed.
    
    After fix:
    qemu-system-x86_64: cannot create PID file: Cannot open pid file: Permission denied
    
    Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
    Message-Id: <20210610084741.456260-1-zhenzhong.duan@intel.com>
    Cc: qemu-stable@nongnu.org
    Fixes: 0546c060 ("vl: split various early command line options to a separate function", 2020-12-10)
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    38f71349
    vl: Fix an assert failure in error path
    Zhenzhong Duan authored
    
    
    Based on the description of error_setg(), the local variable err in
    qemu_maybe_daemonize() should be initialized to NULL.
    
    Without fix, the uninitialized *errp triggers assert failure which
    doesn't show much valuable information.
    
    Before the fix:
    qemu-system-x86_64: ../util/error.c:59: error_setv: Assertion `*errp == NULL' failed.
    
    After fix:
    qemu-system-x86_64: cannot create PID file: Cannot open pid file: Permission denied
    
    Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
    Message-Id: <20210610084741.456260-1-zhenzhong.duan@intel.com>
    Cc: qemu-stable@nongnu.org
    Fixes: 0546c060 ("vl: split various early command line options to a separate function", 2020-12-10)
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading