summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--getgbook.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/getgbook.c b/getgbook.c
index 22fd646..9fa9ff9 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -72,9 +72,8 @@ Page *getpagedetail(char *bookid, char *pg)
return NULL;
snprintf(m, 80, "\"pid\":\"%s\"", pg);
- if((c = strstr(buf,m)) == NULL) {
- free(buf); return NULL;
- }
+ if((c = strstr(buf,m)) == NULL)
+ return NULL;
page = malloc(sizeof(Page));
strncpy(page->name, pg, 80);