slirp: remove unused EMU_RSH
EMU_RSH handling was dropped in commit
0d62c4cfe2
.
The assignment, and subsequent free() of ex_ptr->ex_exec to so->extra
looks unsafe (double free is likely to occur).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
3ed9f823c6
commit
2d6cc3d0e7
|
@ -26,7 +26,6 @@ struct ex_list {
|
||||||
#define EMU_REALAUDIO 0x5
|
#define EMU_REALAUDIO 0x5
|
||||||
#define EMU_RLOGIN 0x6
|
#define EMU_RLOGIN 0x6
|
||||||
#define EMU_IDENT 0x7
|
#define EMU_IDENT 0x7
|
||||||
#define EMU_RSH 0x8
|
|
||||||
|
|
||||||
#define EMU_NOCONNECT 0x10 /* Don't connect */
|
#define EMU_NOCONNECT 0x10 /* Don't connect */
|
||||||
|
|
||||||
|
|
|
@ -1499,8 +1499,6 @@ static int slirp_state_load(QEMUFile *f, void *opaque, int version_id)
|
||||||
}
|
}
|
||||||
if (!ex_ptr)
|
if (!ex_ptr)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
so->extra = (void *)ex_ptr->ex_exec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return vmstate_load_state(f, &vmstate_slirp, slirp, version_id);
|
return vmstate_load_state(f, &vmstate_slirp, slirp, version_id);
|
||||||
|
|
|
@ -89,10 +89,6 @@ sofree(struct socket *so)
|
||||||
soqfree(so, &slirp->if_fastq);
|
soqfree(so, &slirp->if_fastq);
|
||||||
soqfree(so, &slirp->if_batchq);
|
soqfree(so, &slirp->if_batchq);
|
||||||
|
|
||||||
if (so->so_emu==EMU_RSH && so->extra) {
|
|
||||||
sofree(so->extra);
|
|
||||||
so->extra=NULL;
|
|
||||||
}
|
|
||||||
if (so == slirp->tcp_last_so) {
|
if (so == slirp->tcp_last_so) {
|
||||||
slirp->tcp_last_so = &slirp->tcb;
|
slirp->tcp_last_so = &slirp->tcb;
|
||||||
} else if (so == slirp->udp_last_so) {
|
} else if (so == slirp->udp_last_so) {
|
||||||
|
|
|
@ -541,7 +541,6 @@ static const struct tos_t tcptos[] = {
|
||||||
{0, 23, IPTOS_LOWDELAY, 0}, /* telnet */
|
{0, 23, IPTOS_LOWDELAY, 0}, /* telnet */
|
||||||
{0, 80, IPTOS_THROUGHPUT, 0}, /* WWW */
|
{0, 80, IPTOS_THROUGHPUT, 0}, /* WWW */
|
||||||
{0, 513, IPTOS_LOWDELAY, EMU_RLOGIN|EMU_NOCONNECT}, /* rlogin */
|
{0, 513, IPTOS_LOWDELAY, EMU_RLOGIN|EMU_NOCONNECT}, /* rlogin */
|
||||||
{0, 514, IPTOS_LOWDELAY, EMU_RSH|EMU_NOCONNECT}, /* shell */
|
|
||||||
{0, 544, IPTOS_LOWDELAY, EMU_KSH}, /* kshell */
|
{0, 544, IPTOS_LOWDELAY, EMU_KSH}, /* kshell */
|
||||||
{0, 543, IPTOS_LOWDELAY, 0}, /* klogin */
|
{0, 543, IPTOS_LOWDELAY, 0}, /* klogin */
|
||||||
{0, 6667, IPTOS_THROUGHPUT, EMU_IRC}, /* IRC */
|
{0, 6667, IPTOS_THROUGHPUT, EMU_IRC}, /* IRC */
|
||||||
|
|
Loading…
Reference in a new issue