Fixes some memory leaks
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@647 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									aa7d13a3fc
								
							
						
					
					
						commit
						a6a9a6cddf
					
				
							
								
								
									
										1
									
								
								files.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								files.c
									
									
									
									
									
								
							@ -667,4 +667,5 @@ void for_each_file(const char * Nom_repertoire, void Callback(const char *))
 | 
			
		||||
      Callback(Nom_fichier_complet);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  closedir(Repertoire_Courant);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								init.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								init.c
									
									
									
									
									
								
							@ -180,6 +180,8 @@ void Rechercher_drives(void)
 | 
			
		||||
#if !(defined(__macosx__) || defined(__FreeBSD__))
 | 
			
		||||
        free(Liste_points_montage -> me_type);
 | 
			
		||||
#endif
 | 
			
		||||
        free(Liste_points_montage -> me_devname);
 | 
			
		||||
        free(Liste_points_montage -> me_mountdir);
 | 
			
		||||
        free(Liste_points_montage);
 | 
			
		||||
        Liste_points_montage = next;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										5
									
								
								texte.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								texte.c
									
									
									
									
									
								
							@ -149,9 +149,11 @@ void Ajout_fonte(const char *Nom)
 | 
			
		||||
         }
 | 
			
		||||
         else
 | 
			
		||||
         {
 | 
			
		||||
               return;
 | 
			
		||||
            free(Fonte);
 | 
			
		||||
            return;
 | 
			
		||||
         }
 | 
			
		||||
      #else
 | 
			
		||||
         free(Fonte);
 | 
			
		||||
         return;
 | 
			
		||||
      #endif
 | 
			
		||||
  }
 | 
			
		||||
@ -328,6 +330,7 @@ void Initialisation_Texte(void)
 | 
			
		||||
        int i,number;
 | 
			
		||||
        Display* dpy = XOpenDisplay(NULL);
 | 
			
		||||
        char** font_path_list = XGetFontPath(dpy,&number);
 | 
			
		||||
        XCloseDisplay(dpy);
 | 
			
		||||
 | 
			
		||||
        for(i=0;i<number;i++)
 | 
			
		||||
            for_each_file(*(font_path_list+i),Ajout_fonte);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user