readtokens: do not leak internal token_lengths buffer
[pspp] / lib / readtokens.c
index e29f20e69acf988e1dfbcd8bf8bb9aa70e0ddb9c..c65c1b13deb534112c01c1cc5b21709b795f6708 100644 (file)
@@ -197,5 +197,7 @@ readtokens (FILE *stream,
   *tokens_out = tokens;
   if (token_lengths != NULL)
     *token_lengths = lengths;
+  else
+    free (lengths);
   return n_tokens;
 }