Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8361959

[GCC static analyzer] java_props_md.c leak of 'temp' variable is reported

XMLWordPrintable

    • b07
    • generic
    • generic

        The following is reported when building with the gcc static analyzer (-fanalyzer) :

        /jdk/src/java.base/unix/native/libjava/java_props_md.c:244:17: warning: leak of 'temp' [CWE-401] [-Wanalyzer-malloc-leak]
          244 | return 0;

        Seems we have to free temp in an early return.

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: