From 766eb55c4e8929dd49bb71a8299b07b50af89e0a Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Fri, 16 Sep 2016 20:02:34 +0200 Subject: We don't need the "body" element after all But we *do* need to free the memory. --- ezxml.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ezxml.c') diff --git a/ezxml.c b/ezxml.c index 3b6094e..4a063bc 100644 --- a/ezxml.c +++ b/ezxml.c @@ -14,11 +14,7 @@ int process(char *fn) { printf("article-title: %s\n", title->txt); } - ezxml_t body = ezxml_get(ezdoc, "body", -1); - if (!body) { - fprintf(stderr, "No body-tag found in file '%s'. Exiting.\n", fn); - return 1; - } + ezxml_free(ezdoc); return 0; } -- cgit v1.2.1-18-gbd029