Print this page
smatch clean rtld

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/rtld/common/dlfcns.c
          +++ new/usr/src/cmd/sgs/rtld/common/dlfcns.c
↓ open down ↓ 861 lines elided ↑ open up ↑
 862  862          int     in_nfavl = 0;
 863  863  
 864  864          /*
 865  865           * Check for magic link-map list values:
 866  866           *
 867  867           *  LM_ID_BASE:         Operate on the PRIMARY (executables) link map
 868  868           *  LM_ID_LDSO:         Operation on ld.so.1's link map
 869  869           *  LM_ID_NEWLM:        Create a new link-map.
 870  870           */
 871  871          if (lml == (Lm_list *)LM_ID_NEWLM) {
 872      -                if ((lml = calloc(sizeof (Lm_list), 1)) == NULL)
      872 +                if ((lml = calloc(1, sizeof (Lm_list))) == NULL)
 873  873                          return (NULL);
 874  874  
 875  875                  /*
 876  876                   * Establish the new link-map flags from the callers and those
 877  877                   * explicitly provided.
 878  878                   */
 879  879                  lml->lm_tflags = LIST(clmp)->lm_tflags;
 880  880                  if (flags & FLG_RT_AUDIT) {
 881  881                          /*
 882  882                           * Unset any auditing flags - an auditor shouldn't be
↓ open down ↓ 1484 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX