aboutsummaryrefslogtreecommitdiff
path: root/libidn/stringprep.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-19 06:43:34 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-19 06:43:34 +0000
commit72e6cdfa2cd95240439c72705ab28a2eebb7d04e (patch)
treeae830b7817948dc795cc92ec98216c478dde57e3 /libidn/stringprep.c
parent354b75277bc86768eafbbf5f590deb27e0a71d89 (diff)
downloadglibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.gz
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.bz2
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.zip
Remove useless "if" before "free".
Diffstat (limited to 'libidn/stringprep.c')
-rw-r--r--libidn/stringprep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libidn/stringprep.c b/libidn/stringprep.c
index 6041e3937a..f5c9fae073 100644
--- a/libidn/stringprep.c
+++ b/libidn/stringprep.c
@@ -366,8 +366,7 @@ stringprep (char *in,
do
{
- if (ucs4)
- free (ucs4);
+ free (ucs4);
ucs4 = stringprep_utf8_to_ucs4 (in, -1, &ucs4len);
maxucs4len = ucs4len + adducs4len;
uint32_t *newp = realloc (ucs4, maxucs4len * sizeof (uint32_t));
@@ -449,8 +448,7 @@ stringprep_profile (const char *in,
do
{
- if (str)
- free (str);
+ free (str);
str = (char *) malloc (len);
if (str == NULL)
return STRINGPREP_MALLOC_ERROR;