summaryrefslogtreecommitdiff
path: root/libc/misc/search
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
commit88917b0f143e2eac468aea14338b4d9eddba389d (patch)
tree790fd49f0632b93a7ad9cd02974bff82efa60b25 /libc/misc/search
parent43eb269ab1d216074e18dadc74c9671398dfe938 (diff)
replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.
Diffstat (limited to 'libc/misc/search')
-rw-r--r--libc/misc/search/_hsearch_r.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libc/misc/search/_hsearch_r.c b/libc/misc/search/_hsearch_r.c
index 257c0610c..c9c4a9ccf 100644
--- a/libc/misc/search/_hsearch_r.c
+++ b/libc/misc/search/_hsearch_r.c
@@ -110,9 +110,8 @@ void hdestroy_r (struct hsearch_data *htab)
return;
}
- if (htab->table != NULL)
- /* free used memory */
- free (htab->table);
+ /* free used memory */
+ free (htab->table);
/* the sign for an existing table is an value != NULL in htable */
htab->table = NULL;