-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 17
-
Component/s: tools
-
b09
SonarCloud instance reports a new warning after JDK-8254702:
"Use of memory after it is freed"
char* getJvmLauncherLibPath(void) {
...
popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib,
&launcherLibPath);
if (popenStatus) {
free(launcherLibPath); <---- frees here
goto cleanup;
}
}
cleanup:
free(modulePath);
freePackageDesc(pkg);
return launcherLibPath; <--- here
}
"Use of memory after it is freed"
char* getJvmLauncherLibPath(void) {
...
popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib,
&launcherLibPath);
if (popenStatus) {
free(launcherLibPath); <---- frees here
goto cleanup;
}
}
cleanup:
free(modulePath);
freePackageDesc(pkg);
return launcherLibPath; <--- here
}
- relates to
-
JDK-8254702 jpackage app launcher crashes on CentOS
-
- Resolved
-