aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-10-05 15:03:27 +0800
committermarcus <marcus@FreeBSD.org>2003-10-05 15:03:27 +0800
commitb0683ada13e271a29c042fa372f56601165dc663 (patch)
tree0dc4bb3f20b1c0c21d03bb11e44215243fbf9452
parentf505d4911db948c6819ba7734c08331a0f31b814 (diff)
downloadfreebsd-ports-gnome-b0683ada13e271a29c042fa372f56601165dc663.tar.gz
freebsd-ports-gnome-b0683ada13e271a29c042fa372f56601165dc663.tar.zst
freebsd-ports-gnome-b0683ada13e271a29c042fa372f56601165dc663.zip
Avoid a potential memory leak by destroying our pthread_mutexattr_t.
-rw-r--r--www/mplayer-plugin/Makefile1
-rw-r--r--www/mplayer-plugin/files/patch-Source_mplayerplug-in.c7
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;