hash: avoid memory leak on allocation failure
authorEric Blake <ebb9@byu.net>
Mon, 8 Jun 2009 11:56:37 +0000 (05:56 -0600)
committerJim Meyering <meyering@redhat.com>
Fri, 19 Jun 2009 14:30:02 +0000 (16:30 +0200)
commit91fbe86568250b8a159337e5583387306a03b76d
tree9463c5214ab1bd83d0ca99f202ed034248b3279e
parentb7b7fad146c914ff9d4c647cf1dcd92e6aed231e
hash: avoid memory leak on allocation failure

* lib/hash.c: (hash_rehash): Avoid memory leak on allocation
failure.  Factor repeated algorithm...
(transfer_entries): ...into new helper routine.
(hash_delete): React to hash_rehash return value.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/hash.c