Navigation


Changeset 721:01f796160f7f in freeDiameter


Ignore:
Timestamp:
Feb 21, 2011, 6:30:45 PM (10 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Small optimization: use os0dup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rt_default/rtd_rules.c

    r403 r721  
    262262                /* We have to create a copy of the string in this case */
    263263                char *mystrcpy;
    264                 CHECK_MALLOC( mystrcpy = malloc(len + 1) );
    265                 memcpy(mystrcpy, str, len);
    266                 mystrcpy[len] = '\0';
     264                CHECK_MALLOC( mystrcpy = os0dup(str, len) );
    267265                err = regexec(&md->preg, mystrcpy, 0, NULL, 0);
    268266                free(mystrcpy);
Note: See TracChangeset for help on using the changeset viewer.