Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/lisp/os-common.c
    ... ... @@ -782,10 +782,7 @@ os_file_author(const char *path)
    782 782
         }
    
    783 783
         
    
    784 784
         if (result) {
    
    785
    -        author = malloc(strlen(result->pw_name) + 1);
    
    786
    -        if (author) {
    
    787
    -            strcpy(author, result->pw_name);
    
    788
    -        }
    
    785
    +        author = strdup(result->pw_name);
    
    789 786
         }
    
    790 787
     
    
    791 788
         if (buf) {