mirror of
https://github.com/tmux/tmux.git
synced 2025-04-13 23:08:49 +00:00
Remove some unnecessary checks before free().
This commit is contained in:
parent
1a4ddfa8a7
commit
26a55ddcf9
@ -133,7 +133,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
} else if (cp != NULL)
|
} else
|
||||||
free(cp);
|
free(cp);
|
||||||
cwd = fd;
|
cwd = fd;
|
||||||
} else if (c != NULL && c->session == NULL)
|
} else if (c != NULL && c->session == NULL)
|
||||||
|
@ -107,7 +107,7 @@ cmd_new_window_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
} else if (cp != NULL)
|
} else
|
||||||
free(cp);
|
free(cp);
|
||||||
cwd = fd;
|
cwd = fd;
|
||||||
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
||||||
|
@ -101,7 +101,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
} else if (cp != NULL)
|
} else
|
||||||
free(cp);
|
free(cp);
|
||||||
cwd = fd;
|
cwd = fd;
|
||||||
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user