Mercurial > mplayer.hg
diff gui/win32/preferences.c @ 36833:5691f930dca6
Fix bug with Win32 GUI preferences.
Fix memory leak by freeing proc_priority.
author | ib |
---|---|
date | Mon, 24 Feb 2014 14:25:53 +0000 |
parents | edfa61ced4ad |
children | b2e529a2cbab |
line wrap: on
line diff
--- a/gui/win32/preferences.c Mon Feb 24 13:15:23 2014 +0000 +++ b/gui/win32/preferences.c Mon Feb 24 14:25:53 2014 +0000 @@ -32,6 +32,7 @@ #include "osdep/priority.h" #include "mixer.h" #include "gui/util/list.h" +#include "gui/util/string.h" #include "gui/ui/ui.h" #include "gui/interface.h" #include "gui.h" @@ -539,7 +540,7 @@ /* Set the priority level */ SendMessage(prio, CB_GETLBTEXT, (WPARAM)SendMessage(prio, CB_GETCURSEL, 0, 0), (LPARAM)procprio); - proc_priority = strdup(procprio); + setdup(&proc_priority, procprio); /* double buffering */ if(SendDlgItemMessage(hwnd, ID_DOUBLE, BM_GETCHECK, 0, 0) == BST_CHECKED)