lib/striconv.c (str_cd_iconv): Avoid if before free.
authorSimon Josefsson <simon@josefsson.org>
Tue, 12 Jan 2010 21:01:53 +0000 (22:01 +0100)
committerSimon Josefsson <simon@josefsson.org>
Tue, 12 Jan 2010 21:01:53 +0000 (22:01 +0100)
ChangeLog
lib/striconv.c

index d891134b7be3b29bf83496c1a4aa1e7af9e13e32..467c3181494ae6366b63f8213cef47950e09e240 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-12  Simon Josefsson  <simon@josefsson.org>
+
+       * lib/striconv.c (str_cd_iconv): Avoid if before free.
+
 2010-01-12  Simon Josefsson  <simon@josefsson.org>
 
        * top/maint.mk (VC_LIST_EXCEPT): Filter list through
index 25d1f05efd6bfe4f616ff7acdc4cda2c976a623b..35bae576880eb278c7bb9de03ddb2b53dd658cc3 100644 (file)
@@ -233,8 +233,7 @@ str_cd_iconv (const char *src, iconv_t cd)
     (result != NULL ? realloc (result, length + 1) : malloc (length + 1));
   if (final_result == NULL)
     {
-      if (result != NULL)
-        free (result);
+      free (result);
       errno = ENOMEM;
       return NULL;
     }