Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-1863

S3520: Fix false-positives

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: Rules
    • Labels:
      None

      Description

      RSPEC-3520
      Due to loop handling:

      char* ptr = (char*) malloc(sizeof(char));
      int flag = 0;
      while (flag ==0) {
        free(ptr);  // FP raised here
        flag++;
      }
      free(ptr);
      

        Attachments

          Activity

            People

            Assignee:
            massimo.paladin Massimo PALADIN
            Reporter:
            massimo.paladin Massimo PALADIN
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: