diff options
author | Nick White <git@njw.me.uk> | 2011-09-23 19:38:36 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-09-23 19:38:36 +0100 |
commit | b4a06c1ae0925d90aa15e16f5df4839ace7e9d26 (patch) | |
tree | 02b3a5745730cec19c21f011dd84a68ef88e66ba | |
parent | 76315d83930499e4763c7a38787c72b006e8132a (diff) |
Make free usage in getabook more sensible
-rw-r--r-- | getabook.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -28,7 +28,6 @@ int fillurls(char *buf) { int i; if(!(s = strstr(buf, "\"jumboImageUrls\":{"))) { - free(buf); return 1; } s += strlen("\"jumboImageUrls\":{"); @@ -53,7 +52,6 @@ int fillurls(char *buf) { continue; } - free(buf); return 0; } @@ -87,6 +85,7 @@ int getpagelist() fillurls(buf); + free(buf); return 0; } @@ -101,6 +100,7 @@ int getpageurls(int pagenum) { fillurls(buf); + free(buf); return 0; } |