mirror of
				https://github.com/RetroShare/RetroShare.git
				synced 2025-10-30 14:19:14 -04:00 
			
		
		
		
	removed two instances of malloc(0) captured by new rs_malloc funtion
This commit is contained in:
		
							parent
							
								
									d13526facd
								
							
						
					
					
						commit
						d55993d1e4
					
				
					 35 changed files with 73 additions and 56 deletions
				
			
		|  | @ -1121,7 +1121,7 @@ bool p3GRouter::locked_sendTransactionData(const RsPeerId& pid,const RsGRouterTr | |||
|         std::cerr << "  sending to tunnel vpid " << pid << std::endl; | ||||
| #endif | ||||
|         uint32_t turtle_data_size = trans_item.serial_size() ; | ||||
|         uint8_t *turtle_data = (uint8_t*)rs_safe_malloc(turtle_data_size) ; | ||||
|         uint8_t *turtle_data = (uint8_t*)rs_malloc(turtle_data_size) ; | ||||
| 
 | ||||
|         if(turtle_data == NULL) | ||||
|             return false ; | ||||
|  | @ -1302,7 +1302,7 @@ bool p3GRouter::sliceDataItem(RsGRouterAbstractMsgItem *item,std::list<RsGRouter | |||
|             chunk_item->total_size = size; | ||||
|             chunk_item->chunk_start= offset; | ||||
|             chunk_item->chunk_size = chunk_size ; | ||||
|             chunk_item->chunk_data = (uint8_t*)rs_safe_malloc(chunk_size) ; | ||||
|             chunk_item->chunk_data = (uint8_t*)rs_malloc(chunk_size) ; | ||||
| #ifdef GROUTER_DEBUG | ||||
|             std::cerr << "  preparing to send a chunk [" << offset << " -> " << offset + chunk_size << " / " << size << "]" << std::endl; | ||||
| #endif | ||||
|  | @ -1918,7 +1918,7 @@ bool p3GRouter::sendData(const RsGxsId& destination,const GRouterServiceId& clie | |||
| 
 | ||||
|     RsGRouterGenericDataItem *data_item = new RsGRouterGenericDataItem ; | ||||
| 
 | ||||
|     data_item->data_bytes = (uint8_t*)rs_safe_malloc(data_size) ; | ||||
|     data_item->data_bytes = (uint8_t*)rs_malloc(data_size) ; | ||||
|      | ||||
|     if(data_item->data_bytes == NULL) | ||||
|         return false ; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 csoler
						csoler