Changeset 473 for trunk/src/sh_utils.c


Ignore:
Timestamp:
May 29, 2015, 10:42:18 PM (9 years ago)
Author:
katerina
Message:

Fix for ticket #371 (use cppcheck instead of uno for static checking).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_utils.c

    r454 r473  
    13151315  while (0 < (ii = sl_read (fp, &image[s], 4096)))
    13161316    {
     1317      unsigned char * ptr;
    13171318      ilen += ii;
    13181319      s    += 4096;
    1319       image = realloc (image, (size_t) (4096 + s));
     1320      ptr = realloc (image, (size_t) (4096 + s));
     1321      if (ptr)
     1322        image = ptr;
     1323      else
     1324        { free(image); image = NULL; }
    13201325      if (!image)
    13211326        goto bail_mem;
Note: See TracChangeset for help on using the changeset viewer.