Author: mir3x Date: Mon Jan 16 14:03:35 2017 New Revision: 34851 URL: http://svn.gna.org/viewcvs/freeciv?rev=34851&view=rev Log: Qt client - fixed mismatched free/delete
See bug #25431 Modified: branches/S3_0/client/gui-qt/themes.cpp Modified: branches/S3_0/client/gui-qt/themes.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/themes.cpp?rev=34851&r1=34850&r2=34851&view=diff ============================================================================== --- branches/S3_0/client/gui-qt/themes.cpp (original) +++ branches/S3_0/client/gui-qt/themes.cpp Mon Jan 16 14:03:35 2017 @@ -120,7 +120,9 @@ char *persistent = static_cast<char*>(fc_malloc(256)); *count = 1; - array = new char *[*count]; + /* array is deleted in C client code and shouln't + be allocated with new[] */ + array = static_cast<char **>(fc_malloc((*count) * sizeof(char *))); strncpy(persistent, fileinfoname(get_data_dirs(),""), 256); array[0] = persistent; return array; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits