Skip to content
Snippets Groups Projects
Commit 22399ba3 authored by Jeong Han Lee's avatar Jeong Han Lee
Browse files

Revert "potential memory corruption in iocshlocation"

This reverts commit 14476605.
parent 75409d29
No related branches found
No related tags found
No related merge requests found
......@@ -666,7 +666,7 @@ void registerModule(const char* module, const char* version, const char* locatio
return;
}
iocshlocation = (char*) malloc( strlen(abslocation) + strlen(iocshpath) + ll + addSlash );
iocshlocation = malloc( strlen(abslocation) + strlen(iocshpath) );
if (iocshlocation == NULL)
{
fprintf(stderr, "require: registerModule: cannot allocate memory on iocshlocation \n");
......@@ -693,7 +693,7 @@ void registerModule(const char* module, const char* version, const char* locatio
if (location)
{
putenvprintf("%s_DIR=%s", module, m->content+lm+lv);
/* pathAdd("SCRIPT_PATH", m->content+lm+lv);*/
pathAdd("SCRIPT_PATH", m->content+lm+lv);
pathAdd("SCRIPT_PATH", iocshlocation);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment