aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/getinmemory.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-10-10 20:58:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-10-10 20:58:18 +0000
commitab1f5c3edd55910c967bafcb5385ddeaf9dc53e2 (patch)
treed2f6a94c4e7e647dff0eb4a2f50f0a72e941c6f3 /docs/examples/getinmemory.c
parentb2be6799f2be7fa103ef61cbe2a053973d008a5d (diff)
make it compile warning-free and free() the memory before exit
Diffstat (limited to 'docs/examples/getinmemory.c')
-rw-r--r--docs/examples/getinmemory.c5
1 files changed, 5 insertions, 0 deletions
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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <curl/curl.h>
#include <curl/types.h>
@@ -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;
}