From a3b6ddf6ff110efc0d151ef26d18c99ad7d22647 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 11 Nov 2008 23:39:00 +0000 Subject: [PATCH] - API: free project prefs before parsing init file svn path=/trunk/boinc/; revision=16479 --- api/boinc_api.cpp | 6 ++++-- checkin_notes | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index 8a98f7d487..fbdc18a432 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -505,8 +505,10 @@ int boinc_parse_init_data_file() { FILE* f; int retval; - // in principle should free project_preferences here if it's nonzero - + if (aid.project_preferences) { + free(aid.project_preferences); + aid.project_preferences = NULL; + } memset(&aid, 0, sizeof(aid)); strcpy(aid.user_name, ""); strcpy(aid.team_name, ""); diff --git a/checkin_notes b/checkin_notes index 59c3aaaad4..73698f0e6d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9369,3 +9369,9 @@ David 11 Nov 2008 time_stats.cpp lib/ parse.cpp + +David 11 Nov 2008 + - API: free project prefs before parsing init file + + api/ + boinc_api.cpp