diff options
author | fcolin | 2005-08-18 07:36:18 +0000 |
---|---|---|
committer | fcolin | 2005-08-18 07:36:18 +0000 |
commit | 9921017a4b14b379d99305e17f8583ff90de0c1b (patch) | |
tree | 2f76b0a528a766ee67be1ba82973f02acc6e85c2 /src/ivyargument.c | |
parent | f625f6e00c1d5d1194ce3db62e59ccc47fdf2386 (diff) | |
download | ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.zip ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.tar.gz ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.tar.bz2 ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.tar.xz |
memory leak malloc/free cleanup
Diffstat (limited to 'src/ivyargument.c')
-rwxr-xr-x | src/ivyargument.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 <stdlib.h> #include <memory.h> #include <string.h> + #ifdef WIN32 +#include <crtdbg.h> #include <windows.h> #else #include <arpa/inet.h> @@ -29,6 +31,8 @@ #include <unistd.h> #include <netdb.h> #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 ) |