Changeset 454 for trunk/src/sh_utils.c


Ignore:
Timestamp:
Jun 29, 2014, 7:30:04 AM (10 years ago)
Author:
katerina
Message:

Fix for ticket #355 (use calloc instead of malloc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_utils.c

    r444 r454  
    12551255    }
    12561256
    1257   if (NULL == (new = malloc(strlen(new_in) + 1)))
     1257  if (NULL == (new = calloc(1,strlen(new_in) + 1)))
    12581258    goto bail_mem;
    12591259  sl_strncpy(new, new_in, strlen(new_in) + 1);
     
    12821282  len = strlen(path) + 1 + 4;
    12831283  /*@-usedef@*/
    1284   if (NULL == (outpath = malloc(len)))
     1284  if (NULL == (outpath = calloc(1,len)))
    12851285    goto bail_mem;
    12861286  /*@-usedef@*/
     
    13101310
    13111311
    1312   image = malloc (4096);
     1312  image = calloc(1,4096);
    13131313  if (!image)
    13141314    goto bail_mem;
Note: See TracChangeset for help on using the changeset viewer.