diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-06-30 14:32:22 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-06-30 14:32:22 +0000 | 
| commit | 52b133d9d7fb007075f05b8289be517db6574fd3 (patch) | |
| tree | 606b15cae99fd3d4c0ccedac664408716c973113 /hardinfo2/arch/linux | |
| parent | be25921dd3ee581b7b312baf6127f7b628ce186e (diff) | |
Plug memleaks. Cleanups.
Diffstat (limited to 'hardinfo2/arch/linux')
| -rw-r--r-- | hardinfo2/arch/linux/common/inputdevices.h | 10 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/modules.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/x86/processor.h | 4 | 
3 files changed, 8 insertions, 8 deletions
| diff --git a/hardinfo2/arch/linux/common/inputdevices.h b/hardinfo2/arch/linux/common/inputdevices.h index a7102335..28611f32 100644 --- a/hardinfo2/arch/linux/common/inputdevices.h +++ b/hardinfo2/arch/linux/common/inputdevices.h @@ -88,10 +88,10 @@ __scan_input_devices(void)  	    tmp = g_strdup_printf("INP%d", ++n);  	    input_list = g_strdup_printf("%s$%s$%s=\n", -					 input_list, +					 (char*)idle_free(input_list),  					 tmp, name);  	    input_icons = g_strdup_printf("%sIcon$%s$%s=%s\n", -				 	  input_icons, +				 	  (char*)idle_free(input_icons),  					  tmp, name,  					  input_devices[d].icon);  	    gchar *strhash = g_strdup_printf("[Device Information]\n" @@ -106,13 +106,13 @@ __scan_input_devices(void)  	    if (url) {  	    	strhash = g_strdup_printf("%s"  					  "Vendor=%s (%s)\n", -					  strhash, +					  (char*)idle_free(strhash),  					  vendor_get_name(name),  					  url);  	    } else {  	    	strhash = g_strdup_printf("%s"  					  "Vendor=%x\n", -					  strhash, +					  (char*)idle_free(strhash),  					  vendor);  	    } @@ -120,7 +120,7 @@ __scan_input_devices(void)  				      "Product=0x%x\n"  				      "Version=0x%x\n"  				      "Connected to=%s\n", -				      strhash, product, version, phys); +				      (char*)idle_free(strhash), product, version, phys);  	    g_hash_table_insert(moreinfo, tmp, strhash);  	    g_free(phys); diff --git a/hardinfo2/arch/linux/common/modules.h b/hardinfo2/arch/linux/common/modules.h index 54e77ddb..bbde818a 100644 --- a/hardinfo2/arch/linux/common/modules.h +++ b/hardinfo2/arch/linux/common/modules.h @@ -99,7 +99,7 @@ scan_modules_do(void)  	/* append this module to the list of modules */  	module_list = g_strdup_printf("%s$%s$%s=%s\n", -				      module_list ? module_list : "", +				      module_list ? (char*)idle_free(module_list) : "",  				      hashkey,  				      modname,  				      description ? description : ""); diff --git a/hardinfo2/arch/linux/x86/processor.h b/hardinfo2/arch/linux/x86/processor.h index 918bac7c..2aa2f8af 100644 --- a/hardinfo2/arch/linux/x86/processor.h +++ b/hardinfo2/arch/linux/x86/processor.h @@ -279,7 +279,7 @@ gchar *processor_get_capabilities_from_flags(gchar * strflags)  	    }  	} -	tmp = g_strdup_printf("%s%s=%s\n", tmp, flags[j], meaning); +	tmp = g_strdup_printf("%s%s=%s\n", (gchar*)idle_free(tmp), flags[j], meaning);  	j++;      } @@ -347,7 +347,7 @@ static gchar *processor_get_info(GSList * processors)  	    processor = (Processor *) l->data;  	    tmp = g_strdup_printf("%s$CPU%d$%s=%.2fMHz\n", -				  tmp, processor->id, +				  (gchar*)idle_free(tmp), processor->id,  				  processor->model_name,  				  processor->cpu_mhz); | 
