summaryrefslogtreecommitdiff
path: root/src/extensions/inline_keepalive.cpp
diff options
context:
space:
mode:
authoryangwei <[email protected]>2023-07-28 23:40:07 +0800
committeryangwei <[email protected]>2023-08-02 18:22:12 +0800
commit44f4cabef1fd40969e6b874c8d99d0acdf79895a (patch)
treea91fc1a4217b7727a13af1e6095e3d73b1b2314d /src/extensions/inline_keepalive.cpp
parent840c58a1efeed8f5cb7959ac7a110bbf3c2421e7 (diff)
🐞 fix(cmd args mem free): 修复-c参数申请的内存,退出时未释放的bug
Diffstat (limited to 'src/extensions/inline_keepalive.cpp')
-rw-r--r--src/extensions/inline_keepalive.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/extensions/inline_keepalive.cpp b/src/extensions/inline_keepalive.cpp
index 3859443..4509a51 100644
--- a/src/extensions/inline_keepalive.cpp
+++ b/src/extensions/inline_keepalive.cpp
@@ -310,7 +310,6 @@ static int gdev_keepalive_plug(const raw_pkt_t *raw_pkt, int thread_id, unsigned
MESA_send_handle *snd_handle = NULL;
#if IOMODE_MARSIO
const struct mesa_ethernet_hdr *raw_eth_hdr = (struct mesa_ethernet_hdr *)raw_pkt->raw_pkt_data;
- struct mesa_ethernet_hdr *snd_eth_hdr;
#endif
snd_handle = packet_io_get_send_handle(thread_id);
@@ -686,7 +685,7 @@ int gdev_keepalive_set_opt(const SAPP_TLV_T *tlv_value)
int ret = 0;
static time_t last_log_time = 0;
- if((NULL == tlv_value) || (tlv_value->length <= 0)){
+ if((NULL == tlv_value) || (tlv_value->length == 0)){
return -1;
}
@@ -740,7 +739,7 @@ int gdev_keepalive_get_opt(SAPP_TLV_T *tlv_value)
{
int ret = 0;
- if((NULL == tlv_value) || (tlv_value->length <= 0)){
+ if((NULL == tlv_value) || (tlv_value->length == 0)){
return -1;
}