Yes, my bad. I'll send in a fixed patch. I still don't like the way the code looks with the duplication of the default string to use but I couldn't think of any way to fix it more elegantly. Ideas?
Chris
From: Mike Hearn mh@codeweavers.com Date: 2004/03/29 Mon AM 06:07:03 EST To: wine-patches@winehq.com Subject: Re: fix crash in winecfg's x11 dialog due to invalid "Desktop" settings
On Sun, 28 Mar 2004 13:31:15 -0500, Chris Morgan wrote:
- if(!bufindex) /* handle invalid "Desktop" values */
- {
buf = strdup("640x480");
bufindex = strchr(buf, 'x');
- }
It's not a big deal but there's a memory leak there, you need to free buf before strduping the default (which ideally should be a const str at the top of the function so if/when we change the default it's only done in one place).
thanks -mike