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

Incorrect freeing in llapi_dir_create

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.12.0
    • Lustre 2.11.0
    • None
    • 3
    • 9223372036854775807

      llapi_dir_create has this code:

              dirpath = strdup(name);
              if (!dirpath) {
                      free(lmu);
                      return -ENOMEM;
              }
      
              namepath = strdup(name);
              if (!namepath) {
                      free(namepath);
                      free(lmu);
                      return -ENOMEM;
              }
      

      Of course it makes no sense to free() namepath when it was already NULL.
      I suspect it was supposed to be freeing dirpath allocated just above it?

            green Oleg Drokin
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: