Commit 032a1821 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed memory leak in mci structures.

parent 2e4c9057
...@@ -1161,8 +1161,9 @@ DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms) ...@@ -1161,8 +1161,9 @@ DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms)
/* FIXME is there any memory leak here ? */ /* FIXME is there any memory leak here ? */
MCI_GetOpenDrv(wDevID)->lpstrAlias = strdup(lpParms->lpstrAlias); MCI_GetOpenDrv(wDevID)->lpstrAlias = strdup(lpParms->lpstrAlias);
/* mplayer does allocate alias to CDAUDIO */ /* mplayer does allocate alias to CDAUDIO */
} else } else {
MCI_GetOpenDrv(wDevID)->lpstrAlias = NULL; MCI_GetOpenDrv(wDevID)->lpstrAlias = NULL;
}
if (dwParam & MCI_OPEN_TYPE) { if (dwParam & MCI_OPEN_TYPE) {
if (dwParam & MCI_OPEN_TYPE_ID) { if (dwParam & MCI_OPEN_TYPE_ID) {
#if 0 #if 0
...@@ -1261,6 +1262,7 @@ DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms) ...@@ -1261,6 +1262,7 @@ DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
} }
MCI_GetDrv(wDevID)->modp.wType = 0; MCI_GetDrv(wDevID)->modp.wType = 0;
free(MCI_GetDrv(wDevID)->mop.lpstrDeviceType); free(MCI_GetDrv(wDevID)->mop.lpstrDeviceType);
free(MCI_GetDrv(wDevID)->mop.lpstrAlias);
if (dwParam & MCI_NOTIFY) if (dwParam & MCI_NOTIFY)
mciDriverNotify16(lpParms->dwCallback, wDevID, mciDriverNotify16(lpParms->dwCallback, wDevID,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment