From 88917b0f143e2eac468aea14338b4d9eddba389d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 20 May 2008 20:39:38 +0000 Subject: replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe. --- libc/misc/search/_hsearch_r.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libc/misc/search') 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; -- cgit v1.2.3