Make this work for list == NULL. (Coverity)
2006-04-12 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkselection-x11.c (make_list): Make this work for list == NULL. (Coverity)
This commit is contained in:
		 Matthias Clasen
					Matthias Clasen
				
			
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			 Matthias Clasen
						Matthias Clasen
					
				
			
						parent
						
							6d66ce2fc3
						
					
				
				
					commit
					93c2bc828e
				
			| @ -536,10 +536,11 @@ make_list (const gchar  *text, | ||||
|     } | ||||
|  | ||||
|   if (list) | ||||
|     *list = g_new (gchar *, n_strings + 1); | ||||
|  | ||||
|   (*list)[n_strings] = NULL; | ||||
|    | ||||
|     { | ||||
|       *list = g_new (gchar *, n_strings + 1); | ||||
|       (*list)[n_strings] = NULL; | ||||
|     } | ||||
|       | ||||
|   i = n_strings; | ||||
|   tmp_list = strings; | ||||
|   while (tmp_list) | ||||
| @ -548,10 +549,10 @@ make_list (const gchar  *text, | ||||
| 	(*list)[--i] = tmp_list->data; | ||||
|       else | ||||
| 	g_free (tmp_list->data); | ||||
|  | ||||
|        | ||||
|       tmp_list = tmp_list->next; | ||||
|     } | ||||
|  | ||||
|    | ||||
|   g_slist_free (strings); | ||||
|  | ||||
|   return n_strings; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user