gchar *path_env = getenv("PATH");
gchar *new_path = g_strdup_printf("%s:%s", path_env, "/usr/sbin");
setenv("PATH", new_path, 1);
+ g_free(new_path);
}
/* set _gpsoffset */
/* Set up track array (must be done before config). */
memset(&_track, 0, sizeof(_track));
memset(&_route, 0, sizeof(_route));
- MACRO_PATH_INIT(_track);
- MACRO_PATH_INIT(_route);
+ /* initialisation of paths is done in path_init() */
_mapdb_mutex = g_mutex_new();
_mut_priority_mutex = g_mutex_new();
}
/* Attempt to download the route from the server. */
- if(GNOME_VFS_OK != (vfs_result = gnome_vfs_read_entire_file(
- buffer, &size, &bytes)))
+ vfs_result = gnome_vfs_read_entire_file(buffer, &size, &bytes);
+ g_free (buffer);
+
+ if(vfs_result != GNOME_VFS_OK)
{
g_free(bytes);
popup_error(parent, gnome_vfs_result_to_string(vfs_result));
GCONF_KEY_GPS_RCVR_TYPE, NULL);
gint i = 0;
if(gri_type_str)
+ {
for(i = GPS_RCVR_ENUM_COUNT - 1; i > 0; i--)
if(!strcmp(gri_type_str, GPS_RCVR_ENUM_TEXT[i]))
break;
+ g_free(gri_type_str);
+ }
_gri.type = i;
}