Skip to content

Commit

Permalink
Plug leak. (bug 124234)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtc%netscape.com committed Apr 27, 2002
1 parent f35b0ca commit 2dc5b05
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dbm/src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,11 @@ hdestroy(HTAB *hashp)
#endif
free(hashp->filename);
}

if (hashp->tmp_buf)
free(hashp->tmp_buf);
if (hashp->tmp_key)
free(hashp->tmp_key);
free(hashp);

if (save_errno) {
errno = save_errno;
return (DBM_ERROR);
Expand Down Expand Up @@ -900,7 +902,7 @@ hash_access(
n = *bp++;
ndx = 1;
off = hashp->BSIZE;
} else if (bp[1] < REAL_KEY) {
} else if (bp[1] < REAL_KEY) {
if ((ndx =
__find_bigpair(hashp, rbufp, ndx, kp, (int)size)) > 0)
goto found;
Expand Down

0 comments on commit 2dc5b05

Please sign in to comment.