• V Narayanan's avatar
    Bug#43572 Handle failures from hash_init · 728d3c39
    V Narayanan authored
          
    Failure to allocate memory for the hash->array element,
    caused hash_init to return without initializing the other
    members of the hash. Thus although the dynamic array
    buffer may be allocated at a later point in the code, the
    incompletely initialized hash caused fatal failures.
    
    This patch moves the initialization of the other members
    of the hash above the array allocation, so that the usage
    of this hash will not result in fatal failures.
    728d3c39
hash.c 17.7 KB