[vlc-commits] commit: mp4: fix a memory leak and an invalid release in MacOS code. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Mon Jul 5 21:09:21 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 5 20:10:17 2010 +0200| [3fc54c1ac1b1114d88c9ca782de378a0497c0272] | committer: Rémi Duraffort
mp4: fix a memory leak and an invalid release in MacOS code.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fc54c1ac1b1114d88c9ca782de378a0497c0272
---
modules/demux/mp4/drms.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/demux/mp4/drms.c b/modules/demux/mp4/drms.c
index 35d6057..9a29f7c 100644
--- a/modules/demux/mp4/drms.c
+++ b/modules/demux/mp4/drms.c
@@ -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,8 +1783,15 @@ static int GetiPodID( int64_t *p_ipod_id )
IOObjectRelease( iterator );
}
- CFRelease( match_dic );
}
+ else
+ {
+ if( match_dic )
+ CFRelease( match_dic );
+ if( smatch_dic )
+ CFRelease( smatch_dic );
+ }
+
mach_port_deallocate( mach_task_self(), port );
}
More information about the vlc-commits
mailing list