comparison src/win32/win32dep.c @ 7606:08c9d0dcf906

[gaim-migrate @ 8229] " Some things allocated with g_malloc() were being free()'d instead of g_free()'d This patch fixes the ones I managed to find." --Stu Tomlinson (nosnilmot) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 23 Nov 2003 15:32:25 +0000
parents 77727178a1df
children ec291c2cad6a
comparison
equal deleted inserted replaced
7605:7b9630667f43 7606:08c9d0dcf906
357 357
358 hmod = GetModuleHandle(NULL); 358 hmod = GetModuleHandle(NULL);
359 if( hmod == 0 ) { 359 if( hmod == 0 ) {
360 buf = g_win32_error_message( GetLastError() ); 360 buf = g_win32_error_message( GetLastError() );
361 gaim_debug(GAIM_DEBUG_ERROR, "wgaim", "GetModuleHandle error: %s\n", buf); 361 gaim_debug(GAIM_DEBUG_ERROR, "wgaim", "GetModuleHandle error: %s\n", buf);
362 free(buf); 362 g_free(buf);
363 return NULL; 363 return NULL;
364 } 364 }
365 if(GetModuleFileName( hmod, (char*)&install_dir, MAXPATHLEN ) == 0) { 365 if(GetModuleFileName( hmod, (char*)&install_dir, MAXPATHLEN ) == 0) {
366 buf = g_win32_error_message( GetLastError() ); 366 buf = g_win32_error_message( GetLastError() );
367 gaim_debug(GAIM_DEBUG_ERROR, "wgaim", "GetModuleFileName error: %s\n", buf); 367 gaim_debug(GAIM_DEBUG_ERROR, "wgaim", "GetModuleFileName error: %s\n", buf);
368 free(buf); 368 g_free(buf);
369 return NULL; 369 return NULL;
370 } 370 }
371 buf = g_path_get_dirname( install_dir ); 371 buf = g_path_get_dirname( install_dir );
372 strcpy( (char*)&install_dir, buf ); 372 strcpy( (char*)&install_dir, buf );
373 free( buf ); 373 g_free( buf );
374 374
375 return (char*)&install_dir; 375 return (char*)&install_dir;
376 } 376 }
377 377
378 char* wgaim_lib_dir(void) { 378 char* wgaim_lib_dir(void) {