Changeset 560 for trunk/src/sh_srp.c


Ignore:
Timestamp:
Oct 31, 2020, 11:44:21 PM (4 years ago)
Author:
katerina
Message:

Fix for ticket #449 (gcc 10 compile issues).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_srp.c

    r544 r560  
    119119            get_str_internal = ptr;
    120120          else
    121             { free(get_str_internal); get_str_internal = NULL; }
     121            {
     122              /* "If realloc() fails, the original block is left untouched;
     123               * it is not freed or moved." */
     124              /* cppcheck-suppress doubleFree */
     125              free(get_str_internal);
     126              get_str_internal = NULL;
     127            }
    122128        }
    123129      if (get_str_internal == NULL)
Note: See TracChangeset for help on using the changeset viewer.