Changeset 1c7da86 in mainline


Ignore:
Timestamp:
2006-04-17T15:55:33Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3d77747
Parents:
da32cea
Message:

Fix the same bug in uspace hash table implementation that we used to have in kernel (i.e. only half of the necessary memory was allocated and initialized).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libadt/generic/hash_table.c

    rda32cea r1c7da86  
    5555        assert(max_keys > 0);
    5656       
    57         h->entry = malloc(m * sizeof(link_t *));
     57        h->entry = malloc(m * sizeof(link_t));
    5858        if (!h->entry) {
    5959                printf("cannot allocate memory for hash table\n");
    6060                return false;
    6161        }
    62         memset((void *) h->entry, 0,  m * sizeof(link_t *));
     62        memset((void *) h->entry, 0,  m * sizeof(link_t));
    6363       
    6464        for (i = 0; i < m; i++)
Note: See TracChangeset for help on using the changeset viewer.