Commit 1c3381af authored by Markus Armbruster's avatar Markus Armbruster Committed by Paolo Bonzini
Browse files

scsi: Drop superfluous conditionals around g_free()

parent e42a92ae
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -298,7 +298,6 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
#endif

    if (r->req.cmd.xfer == 0) {
        if (r->buf != NULL)
        g_free(r->buf);
        r->buflen = 0;
        r->buf = NULL;
@@ -314,7 +313,6 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
    }

    if (r->buflen != r->req.cmd.xfer) {
        if (r->buf != NULL)
        g_free(r->buf);
        r->buf = g_malloc(r->req.cmd.xfer);
        r->buflen = r->req.cmd.xfer;