mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-19 06:19:34 +08:00
commit
d6e445f220
@ -66,7 +66,11 @@ int delay_manager_t::add(my_time_t delay,const dest_t &dest,char *data,int len)
|
|||||||
|
|
||||||
delay_data_t tmp=delay_data;
|
delay_data_t tmp=delay_data;
|
||||||
tmp.data=(char *)malloc(delay_data.len+100);
|
tmp.data=(char *)malloc(delay_data.len+100);
|
||||||
|
if(!tmp.data)
|
||||||
|
{
|
||||||
|
mylog(log_warn, "malloc() returned null in delay_manager_t::add()");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
memcpy(tmp.data,data,delay_data.len);
|
memcpy(tmp.data,data,delay_data.len);
|
||||||
|
|
||||||
my_time_t tmp_time=get_current_time_us();
|
my_time_t tmp_time=get_current_time_us();
|
||||||
|
4
lib/rs.c
4
lib/rs.c
@ -51,6 +51,10 @@ void* get_code(int k,int n)
|
|||||||
if (table==0)
|
if (table==0)
|
||||||
{
|
{
|
||||||
table=(void* (*)[256]) malloc(sizeof(void*)*256*256);
|
table=(void* (*)[256]) malloc(sizeof(void*)*256*256);
|
||||||
|
if(!table)
|
||||||
|
{
|
||||||
|
return table;
|
||||||
|
}
|
||||||
memset(table,0,sizeof(void*)*256*256);
|
memset(table,0,sizeof(void*)*256*256);
|
||||||
}
|
}
|
||||||
if(table[k][n]==0)
|
if(table[k][n]==0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user