From ab1f5c3edd55910c967bafcb5385ddeaf9dc53e2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Oct 2005 20:58:18 +0000 Subject: make it compile warning-free and free() the memory before exit --- docs/examples/getinmemory.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/examples') diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c index 3ca3aedd2..00ed39eb2 100644 --- a/docs/examples/getinmemory.c +++ b/docs/examples/getinmemory.c @@ -14,6 +14,8 @@ */ #include +#include +#include #include #include @@ -93,5 +95,8 @@ int main(int argc, char **argv) * you're done with it, you should free() it as a nice application. */ + if(chunk.memory) + free(chunk.memory); + return 0; } -- cgit v1.2.3