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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 26
    • core-libs
    • None
    • 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.

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

              Created:
              Updated: