From 51febce1d32dd4cd7c185b8c1a60266521698716 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 19 Nov 2004 14:40:56 +0000 Subject: [PATCH] Fix a memory leak in extal.c --- src/native/common/extal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/native/common/extal.c b/src/native/common/extal.c index 4c840861..78aa1e80 100644 --- a/src/native/common/extal.c +++ b/src/native/common/extal.c @@ -188,9 +188,11 @@ static bool LoadOpenAL(JNIEnv *env, jobjectArray oalPaths) { #endif if (handleOAL != NULL) { printfDebug("Found OpenAL at '%s'\n", path_str); - return true; } free(path_str); + if (handleOAL != NULL) { + return true; + } } throwException(env, "Could not load openal library."); return false;