Fix bug of ff_ipc_msg_free in ff tools.

The ff msg shouldn't to free while `ff_ipc_send` success but `ff_ipc_recv` failed (such as F-Stack app are breaking by gdb).
This commit is contained in:
fengbojiang 2021-01-24 21:49:07 +08:00
parent 9fc26dbf88
commit c0904131cb
6 changed files with 0 additions and 6 deletions

View File

@ -142,7 +142,6 @@ ioctl_va(int fd, unsigned long com, void *data, int argc, ...)
ret = ff_ipc_recv(&retmsg, msg->msg_type);
if (ret < 0) {
errno = EPIPE;
ff_ipc_msg_free(msg);
return -1;
}
} while (msg != retmsg);

View File

@ -116,7 +116,6 @@ rtioctl(char *data, unsigned len, unsigned read_len)
ret = ff_ipc_recv(&retmsg, msg->msg_type);
if (ret < 0) {
errno = EPIPE;
ff_ipc_msg_free(msg);
return -1;
}
} while (msg != retmsg);

View File

@ -87,7 +87,6 @@ ipfw_ctl(int cmd, int level, int optname, void *optval, socklen_t *optlen)
ret = ff_ipc_recv(&retmsg, msg->msg_type);
if (ret < 0) {
errno = EPIPE;
ff_ipc_msg_free(msg);
return -1;
}
} while (msg != retmsg);

View File

@ -121,7 +121,6 @@ ngctl(int cmd, void *data, size_t len)
ret = ff_ipc_recv(&retmsg, msg->msg_type);
if (ret < 0) {
errno = EPIPE;
ff_ipc_msg_free(msg);
return -1;
}
} while (msg != retmsg);

View File

@ -36,7 +36,6 @@ int cpu_status(struct ff_top_args *top)
ret = ff_ipc_recv(&retmsg, msg->msg_type);
if (ret < 0) {
errno = EPIPE;
ff_ipc_msg_free(msg);
return -1;
}
} while (msg != retmsg);

View File

@ -36,7 +36,6 @@ int traffic_status(struct ff_traffic_args *traffic)
ret = ff_ipc_recv(&retmsg, msg->msg_type);
if (ret < 0) {
errno = EPIPE;
ff_ipc_msg_free(msg);
return -1;
}
} while (msg != retmsg);