Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-17802

CoverityID 425355: (RESOURCE_LEAK) Variable "out" going out of scope leaks the storage it points to.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      From patch: d4682ff4

      > *** CID 425355:    (RESOURCE_LEAK)
      > /lustre/mgs/mgs_llog.c: 189 in name_create_osp()
      > 183     
      > 184         OBD_ALLOC(out, size);
      > 185         if (!out)
      > 186             return -ENOMEM;
      > 187     
      > 188         if (snprintf(out, size, "%s-%s-MDT%04x", tgtname, type, index) >= size)
      >>>>    CID 425355:    (RESOURCE_LEAK)
      >>>>    Variable "out" going out of scope leaks the storage it points to.
      > 189             return -EOVERFLOW;
      > 190     
      > 191         *ospname = out;
      > 192         if (devtype)
      > 193             *devtype = type;
      > 194     
      > /lustre/mgs/mgs_llog.c: 189 in name_create_osp()
      > 183     
      > 184         OBD_ALLOC(out, size);
      > 185         if (!out)
      > 186             return -ENOMEM;
      > 187     
      > 188         if (snprintf(out, size, "%s-%s-MDT%04x", tgtname, type, index) >= size)
      >>>>    CID 425355:    (RESOURCE_LEAK)
      >>>>    Variable "out" going out of scope leaks the storage it points to.
      > 189             return -EOVERFLOW;
      > 190     
      > 191         *ospname = out;
      > 192         if (devtype)
      > 193             *devtype = type;
      > 194     
      > 

      Attachments

        Activity

          People

            wc-triage WC Triage
            arshad512 Arshad Hussain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: