fixed yet another very potential memleak;
This commit is contained in:
		
							parent
							
								
									e857badffd
								
							
						
					
					
						commit
						412dbefe67
					
				| @ -218,7 +218,7 @@ int channel_close(chnl_t *chnl) | ||||
| { | ||||
|   char *uuid_; | ||||
|   usrtc_node_t *node = NULL; | ||||
|   int r; | ||||
|   int r = 0; | ||||
|   conn_t *co = chnl->connection; | ||||
|   conn_sys_t *ssys = co->ssys; | ||||
|   sxmsg_t *sms; | ||||
| @ -244,9 +244,10 @@ int channel_close(chnl_t *chnl) | ||||
| 
 | ||||
|   uuid_ = __generate_uuid(); | ||||
|   pl = malloc(sizeof(sxpayload_t)); | ||||
|   if(!pl) { | ||||
|   if(!pl || !uuid_) { | ||||
|     pthread_rwlock_unlock(&(chnl->msglock)); | ||||
|     free(uuid_); | ||||
|     if(pl) free(pl); | ||||
|     if(uuid_) free(uuid_); | ||||
|     return ENOMEM; | ||||
|   } | ||||
|   if(__create_sys_msg(&sms, uuid_, chnl, pl)) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user