From 1a7df8bda6bed55a5a194a087e2468090f3a1a7a Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Sun, 5 Oct 2003 07:03:27 +0000 Subject: Avoid a potential memory leak by destroying our pthread_mutexattr_t. --- www/mplayer-plugin/Makefile | 1 + www/mplayer-plugin/files/patch-Source_mplayerplug-in.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/www/mplayer-plugin/Makefile b/www/mplayer-plugin/Makefile index 229bb687c1c6..0e45d8156298 100644 --- a/www/mplayer-plugin/Makefile +++ b/www/mplayer-plugin/Makefile @@ -7,6 +7,7 @@ PORTNAME= mplayerplug-in PORTVERSION= 0.95 +PORTREVISION= 1 CATEGORIES= www multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mplayerplug-in diff --git a/www/mplayer-plugin/files/patch-Source_mplayerplug-in.c b/www/mplayer-plugin/files/patch-Source_mplayerplug-in.c index 928ca0cbbc19..81eb502fe5df 100644 --- a/www/mplayer-plugin/files/patch-Source_mplayerplug-in.c +++ b/www/mplayer-plugin/files/patch-Source_mplayerplug-in.c @@ -1,5 +1,5 @@ ---- Source/mplayerplug-in.c.orig Fri Oct 3 10:54:52 2003 -+++ Source/mplayerplug-in.c Sun Oct 5 02:45:25 2003 +--- Source/mplayerplug-in.c.orig Fri Oct 3 07:54:52 2003 ++++ Source/mplayerplug-in.c Sun Oct 5 00:02:12 2003 @@ -28,7 +28,7 @@ */ @@ -35,13 +35,14 @@ if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; -@@ -281,6 +282,9 @@ +@@ -281,6 +282,10 @@ instance->pdata = NPN_MemAlloc(sizeof(PluginInstance)); This = (PluginInstance *) instance->pdata; InitPrivateData(instance); + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&playlist_mutex, &attr); ++ pthread_mutexattr_destroy(&attr); DESTROYED = 0; -- cgit v1.2.3