From 9921017a4b14b379d99305e17f8583ff90de0c1b Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 18 Aug 2005 07:36:18 +0000 Subject: memory leak malloc/free cleanup --- src/ivyargument.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ivyargument.c') diff --git a/src/ivyargument.c b/src/ivyargument.c index 5333b99..5d398d9 100755 --- a/src/ivyargument.c +++ b/src/ivyargument.c @@ -21,7 +21,9 @@ #include #include #include + #ifdef WIN32 +#include #include #else #include @@ -29,6 +31,8 @@ #include #include #endif + + #include "list.h" #include "ivyargument.h" @@ -54,6 +58,12 @@ IvyArgument IvyArgumentNew( int len, const void * value ) } void IvyArgumentFree( IvyArgument arg ) { + IvyArgument p; + IvyArgument psuiv; + IVY_LIST_EACH_SAFE( arg->childrens, p, psuiv ) + { + IvyArgumentFree(p); + } free( arg ); } void IvyArgumentGetValue( IvyArgument arg, int * len, const void **val ) -- cgit v1.1