Cygwin: FIFO: avoid crashes when cloning a client
fhandler_fifo::clone called fhandler_base::clone on each client fhandler. But those fhandlers are actually fhandler_fifo objects, so when fhandler_base::clone calls copyto, it's actually fhandler_fifo::copyto that gets called. This can lead to mysterious crashes. Fix this by simply calling clone (which translates to fhandler_fifo::clone) on each client fhandler.
This commit is contained in:
		
							parent
							
								
									ee394c311e
								
							
						
					
					
						commit
						40db74128a
					
				| 
						 | 
				
			
			@ -1316,7 +1316,7 @@ public:
 | 
			
		|||
    fhandler_fifo *fhf = new (ptr) fhandler_fifo (ptr);
 | 
			
		||||
    copyto (fhf);
 | 
			
		||||
    for (int i = 0; i < nclients; i++)
 | 
			
		||||
      fhf->client[i].fh = client[i].fh->fhandler_base::clone ();
 | 
			
		||||
      fhf->client[i].fh = client[i].fh->clone ();
 | 
			
		||||
    return fhf;
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue