Commit b7278d3d authored by Austin Seipp's avatar Austin Seipp
Browse files

rts: Fix memory leak when loading ELF objects



Issue discovered by Coverity Scan, CID 43168.
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent e597f5fe
...@@ -1900,6 +1900,7 @@ addDLL( pathchar *dll_name ) ...@@ -1900,6 +1900,7 @@ addDLL( pathchar *dll_name )
// success -- try to dlopen the first named file // success -- try to dlopen the first named file
IF_DEBUG(linker, debugBelch("match%s\n","")); IF_DEBUG(linker, debugBelch("match%s\n",""));
line[match[2].rm_eo] = '\0'; line[match[2].rm_eo] = '\0';
stgFree((void*)errmsg); // Free old message before creating new one
errmsg = internal_dlopen(line+match[2].rm_so); errmsg = internal_dlopen(line+match[2].rm_so);
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment