Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-34821

cil_binary.c:919: leaked_storage: Variable "mls_level" going out of scope

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • rhel-10.0.beta
    • libsepol
    • None
    • Low
    • 1
    • rhel-sst-security-selinux
    • ssg_security
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • SELINUX 240925 - 241016
    • Hide

      This error is no longer identified by Coverity scan.

      Show
      This error is no longer identified by Coverity scan.
    • Pass
    • None
    • None

      Error: RESOURCE_LEAK (CWE-772):
      libsepol-3.6/cil/src/cil_binary.c:902: alloc_fn: Storage is returned from allocation function "cil_malloc".
      libsepol-3.6/cil/src/cil_binary.c:902: var_assign: Assigning: "mls_level" = storage returned from "cil_malloc(24UL)".
      libsepol-3.6/cil/src/cil_binary.c:903: noescape: Resource "mls_level" is not freed or pointed-to in "mls_level_init".
      libsepol-3.6/cil/src/cil_binary.c:905: noescape: Resource "mls_level" is not freed or pointed-to in "mls_level_cpy".
      libsepol-3.6/cil/src/cil_binary.c:919: leaked_storage: Variable "mls_level" going out of scope leaks the storage it points to.
      #  917|           free(sepol_alias);
      #  918|           free(key);
      #  919|->         return rc;
      #  920|   }
      #  921| 

              vmojzis@redhat.com Vit Mojzis
              rhn-engineering-plautrba Petr Lautrbach
              Petr Lautrbach Petr Lautrbach
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: