(1892) xkb: XkbInitRules() don't hard-crash the server on strdup() fail
No need to hard-crash the whole server if some strdup() calls failing, those fields already may be NULL, so consumers can handle that situation. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									9284d82d03
								
							
						
					
					
						commit
						f1bc7745ab
					
				| 
						 | 
				
			
			@ -207,11 +207,11 @@ XkbInitRules(XkbRMLVOSet *rmlvo,
 | 
			
		|||
             const char *variant,
 | 
			
		||||
             const char *options)
 | 
			
		||||
{
 | 
			
		||||
    rmlvo->rules = rules ? XNFstrdup(rules) : NULL;
 | 
			
		||||
    rmlvo->model = model ? XNFstrdup(model) : NULL;
 | 
			
		||||
    rmlvo->layout = layout ? XNFstrdup(layout) : NULL;
 | 
			
		||||
    rmlvo->variant = variant ? XNFstrdup(variant) : NULL;
 | 
			
		||||
    rmlvo->options = options ? XNFstrdup(options) : NULL;
 | 
			
		||||
    rmlvo->rules = rules ? strdup(rules) : NULL;
 | 
			
		||||
    rmlvo->model = model ? strdup(model) : NULL;
 | 
			
		||||
    rmlvo->layout = layout ? strdup(layout) : NULL;
 | 
			
		||||
    rmlvo->variant = variant ? strdup(variant) : NULL;
 | 
			
		||||
    rmlvo->options = options ? strdup(options) : NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue