X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Freadtokens.c;h=672bc8f49d6f9577c1954e16e672cbab644e26ba;hb=59b191ed5bcff4198c9c89d0d52cec1880b9568d;hp=8172eb1f15a23d323adb9672336723dc12871d1d;hpb=0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c;p=gnulib.git diff --git a/lib/readtokens.c b/lib/readtokens.c index 8172eb1f1..672bc8f49 100644 --- a/lib/readtokens.c +++ b/lib/readtokens.c @@ -1,6 +1,6 @@ /* readtokens.c -- Functions for reading tokens from an input stream. - Copyright (C) 1990-1991, 1999-2004, 2006, 2009-2010 Free Software + Copyright (C) 1990-1991, 1999-2004, 2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -31,6 +31,8 @@ #include #include +#include "xalloc.h" + #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif @@ -195,5 +197,7 @@ readtokens (FILE *stream, *tokens_out = tokens; if (token_lengths != NULL) *token_lengths = lengths; + else + free (lengths); return n_tokens; }