Carl Shapiro pushed to branch master at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/lisp/elf.c
    ... ... @@ -333,13 +333,20 @@ obj_run_linker(long init_func_address, char *file)
    333 333
         extern int debug_lisp_search;
    
    334 334
     #ifndef UNICODE
    
    335 335
         paths = strdup((char *)vec->data);
    
    336
    +    if (paths == NULL) {
    
    337
    +	perror("strdup");
    
    338
    +	return -1;
    
    339
    +    }
    
    336 340
     #else
    
    337 341
         /*
    
    338 342
          * What should we do here with 16-bit characters?  For now we just
    
    339 343
          * take the low 8-bits.
    
    340 344
          */
    
    341 345
         paths = malloc(vec->length);
    
    342
    -    {
    
    346
    +    if (paths == NULL) {
    
    347
    +	perror("malloc");
    
    348
    +	return -1;
    
    349
    +    } else {
    
    343 350
             int k;
    
    344 351
             unsigned short *data;
    
    345 352
             data = (unsigned short*) vec->data;