wtokenfree does not free the first entry of an array
patch from Tobias Stoeckmann
This commit is contained in:
parent
1a9ed04220
commit
886c0ab2bd
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-WINGs_string_c,v 1.3 2002/01/04 22:40:02 wilfried Exp $
|
||||
--- WINGs/string.c.orig Sat Nov 17 05:43:30 2001
|
||||
+++ WINGs/string.c Fri Jan 4 13:54:19 2002
|
||||
$OpenBSD: patch-WINGs_string_c,v 1.4 2007/04/25 11:32:55 wilfried Exp $
|
||||
--- WINGs/string.c.orig Tue Oct 12 20:32:12 2004
|
||||
+++ WINGs/string.c Thu Mar 15 20:00:31 2007
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "wconfig.h"
|
||||
@ -9,3 +9,12 @@ $OpenBSD: patch-WINGs_string_c,v 1.3 2002/01/04 22:40:02 wilfried Exp $
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -153,7 +153,7 @@ wtokenjoin(char **list, int count)
|
||||
void
|
||||
wtokenfree(char **tokens, int count)
|
||||
{
|
||||
- while (--count) wfree(tokens[count]);
|
||||
+ while (count--) wfree(tokens[count]);
|
||||
wfree(tokens);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user