diff options
author | Yang Tse <yangsita@gmail.com> | 2008-10-27 05:29:17 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-10-27 05:29:17 +0000 |
commit | e29f62f0a7034a2a42fb43b913e6576e63a03fe5 (patch) | |
tree | 493ea203a4c942151fb7716baea92ff9fab6ece1 /lib/hash.c | |
parent | 39e5fa6ae86c0df6c59da8c732ea8f5db35257fd (diff) | |
download | curl-e29f62f0a7034a2a42fb43b913e6576e63a03fe5.tar.gz |
add null-pointer check
Diffstat (limited to 'lib/hash.c')
-rw-r--r-- | lib/hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hash.c b/lib/hash.c index f7d072482..7757d8b64 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -45,7 +45,8 @@ hash_element_dtor(void *user, void *element) if(e->key) free(e->key); - h->dtor(e->ptr); + if(e->ptr) + h->dtor(e->ptr); free(e); } |