From 41f1fc1920639af3bf7c4655e632567ac9ea1ced Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Sat, 8 Dec 2012 06:36:53 +0000 Subject: [PATCH] Actually mlock the right pointer! --- fluidsynth/src/sfloader/fluid_defsfont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluidsynth/src/sfloader/fluid_defsfont.c b/fluidsynth/src/sfloader/fluid_defsfont.c index 58e4b257..8fc4366d 100644 --- a/fluidsynth/src/sfloader/fluid_defsfont.c +++ b/fluidsynth/src/sfloader/fluid_defsfont.c @@ -259,7 +259,7 @@ static int fluid_cached_sampledata_load(char *filename, unsigned int samplepos, } if (try_mlock && !cached_sampledata->mlock) { - if (fluid_mlock(*sampledata, samplesize) != 0) + if (fluid_mlock(cached_sampledata->sampledata, samplesize) != 0) FLUID_LOG(FLUID_WARN, "Failed to pin the sample data to RAM; swapping is possible."); else cached_sampledata->mlock = try_mlock; @@ -306,7 +306,7 @@ static int fluid_cached_sampledata_load(char *filename, unsigned int samplepos, probably means that the user doesn't have to required permission. */ cached_sampledata->mlock = 0; if (try_mlock) { - if (fluid_mlock(*sampledata, samplesize) != 0) + if (fluid_mlock(loaded_sampledata, samplesize) != 0) FLUID_LOG(FLUID_WARN, "Failed to pin the sample data to RAM; swapping is possible."); else cached_sampledata->mlock = try_mlock;