summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-09-23 19:38:36 +0100
committerNick White <git@njw.me.uk>2011-09-23 19:38:36 +0100
commitb4a06c1ae0925d90aa15e16f5df4839ace7e9d26 (patch)
tree02b3a5745730cec19c21f011dd84a68ef88e66ba
parent76315d83930499e4763c7a38787c72b006e8132a (diff)
Make free usage in getabook more sensible
-rw-r--r--getabook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/getabook.c b/getabook.c
index 9f10868..03552a7 100644
--- a/getabook.c
+++ b/getabook.c
@@ -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;
}