WINGs: Fix memory leak in wtokenfree()
commite522ca734d0559acee95f1521ca85e56ee7855b5
authorTobias Stoeckmann <tobias@openbsd.org>
Sun, 18 Feb 2007 02:47:47 +0000 (18 03:47 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 22 Aug 2009 18:40:27 +0000 (22 20:40 +0200)
tree7b4cf83c9901c902a650b4faa722c67fa46438a3
parent3a0eb643d95af8dfac75b2306141d2007325b63f
WINGs: Fix memory leak in wtokenfree()

wtokenfree() does not free the first entry of an array.
If count is 1 then

   while (--count)

will be

   while (0)

and the inner body of that while-loop will not be entered.
Therefore a memory leak happens every time wtokenfree() is called.

Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/patches/

[crmafra: This patch, altough correct, breaks WPrefs.app, which will be
fixed by the next patch. ]
WINGs/string.c