iconv: Work around AIX 6.1..7.1 bug.
[gnulib.git] / lib / readtokens.c
index 8fc7c6b..c65c1b1 100644 (file)
@@ -1,7 +1,7 @@
 /* readtokens.c  -- Functions for reading tokens from an input stream.
 
-   Copyright (C) 1990-1991, 1999-2004, 2006, 2009 Free Software Foundation,
-   Inc.
+   Copyright (C) 1990-1991, 1999-2004, 2006, 2009-2010 Free Software
+   Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -197,5 +197,7 @@ readtokens (FILE *stream,
   *tokens_out = tokens;
   if (token_lengths != NULL)
     *token_lengths = lengths;
+  else
+    free (lengths);
   return n_tokens;
 }