diff --git a/multimedia/plugin/ladspa-sdk/actions.py b/multimedia/plugin/ladspa-sdk/actions.py
index daaafe7a25..5f3461283c 100644
--- a/multimedia/plugin/ladspa-sdk/actions.py
+++ b/multimedia/plugin/ladspa-sdk/actions.py
@@ -22,9 +22,12 @@ def build():
targets' % (get.CC(), get.CXX(), get.LD()))
def install():
- autotools.install('INSTALL_PLUGINS_DIR="/usr/lib/ladspa" \
+ autotools.install('INSTALL_PLUGINS_DIR="%s/usr/lib/ladspa" \
+ INSTALL_INCLUDE_DIR="%s/usr/include" \
+ INSTALL_BINARY_DIR="%s/usr/bin" \
MKDIR_P="mkdir -p" \
- DESTDIR="%s"' % get.installDIR())
+ DESTDIR="%s" \
+ ' % (get.installDIR(), get.installDIR(), get.installDIR(), get.installDIR()))
shelltools.cd("..")
pisitools.dohtml("doc/*.html")
diff --git a/multimedia/plugin/ladspa-sdk/files/fix-memleak-in-plugin-scanning.patch b/multimedia/plugin/ladspa-sdk/files/fix-memleak-in-plugin-scanning.patch
new file mode 100644
index 0000000000..76cb2e8640
--- /dev/null
+++ b/multimedia/plugin/ladspa-sdk/files/fix-memleak-in-plugin-scanning.patch
@@ -0,0 +1,11 @@
+--- src/search.c.orig 2008-11-07 00:38:18.000000000 +0100
++++ src/search.c 2008-11-07 00:50:51.000000000 +0100
+@@ -83,6 +83,8 @@
+ dlclose(pcFilename);
+ free(pcFilename);
+ }
++ } else {
++ free(pcFilename);
+ }
+ }
+ }
diff --git a/multimedia/plugin/ladspa-sdk/pspec.xml b/multimedia/plugin/ladspa-sdk/pspec.xml
index 1832572a62..9f15ff0628 100644
--- a/multimedia/plugin/ladspa-sdk/pspec.xml
+++ b/multimedia/plugin/ladspa-sdk/pspec.xml
@@ -15,6 +15,7 @@
http://www.ladspa.org/download/ladspa_sdk_1.15.tgz
ladspa-sdk-1.12-gcc4.patch
+ fix-memleak-in-plugin-scanning.patch