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

Free'ing macros already check NULL

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

      The common free'ing macros already check for NULL, so we don't need to explicitly check this beforehand.

      @@
      expression E;
      @@
      - if (E != NULL)
      (
        OBD_FREE_PTR(E);
      |
        OBD_FREE(E, ...);
      |
        LIBCFS_FREE(E, ...);
      |
        CFS_FREE_PTR(E);
      |
        CFS_FREE_PTR_ARRAY(E, ...);
      ) 

            timday Tim Day
            timday Tim Day
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: