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

fix memory leak found by SAST static testing

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-9.5
    • rhel-9.3.0
    • usermode
    • None
    • usermode-1.114-5.el9
    • None
    • Moderate
    • rhel-sst-cs-system-management
    • ssg_core_services
    • 25
    • 1
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • Release Note Not Required
    • None

      fix issue found by SAST testing (see RHEL-23320)

      Error: RESOURCE_LEAK (CWE-772):
      usermode-1.114/gsmclient.c:200: alloc_fn: Storage is returned from allocation function "g_get_current_dir".
      usermode-1.114/gsmclient.c:200: noescape: Resource "g_get_current_dir()" is not freed or pointed-to in "smprop_new_string".
      usermode-1.114/gsmclient.c:200: leaked_storage: Failing to save or free storage allocated by "g_get_current_dir()" leaks it.

      1. 198| * with an empty proplist)
      2. 199| */
      3. 200|-> push_prop (client, smprop_new_string (GSM_CLIENT_PROPERTY_CURRENT_DIRECTORY,
      4. 201| g_get_current_dir (), -1));
      5. 202|

        Please provide the package NVR for which bug is seen:

      usermode-1.114

       

              mhlavink Michal Hlavinka
              mhlavink Michal Hlavinka
              Michal Hlavinka Michal Hlavinka
              Evgeny Fedin Evgeny Fedin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: