Commit 01390cc1 authored by Rémi Duraffort's avatar Rémi Duraffort

mp4: fix a memory leak and an invalid release in MacOS code.

(cherry picked from commit 3fc54c1a)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 6a457fe2
......@@ -1751,6 +1751,7 @@ static int GetiPodID( int64_t *p_ipod_id )
CFDictionarySetValue( match_dic,
CFSTR(kIOPropertyMatchKey),
smatch_dic );
CFRelease( smatch_dic );
if( IOServiceGetMatchingServices( port, match_dic,
&iterator ) == KERN_SUCCESS )
......@@ -1782,9 +1783,16 @@ static int GetiPodID( int64_t *p_ipod_id )
IOObjectRelease( iterator );
}
}
else
{
if( match_dic )
CFRelease( match_dic );
if( smatch_dic )
CFRelease( smatch_dic );
}
mach_port_deallocate( mach_task_self(), port );
}
#endif
......
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