summaryrefslogtreecommitdiffabout
path: root/src/txtacc.c
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 09:18:04 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-16 09:21:25 (GMT)
commitaa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c (patch) (side-by-side diff)
tree3bdf880ec5c4bd2c97d7d7ff665e13a7ca4b0a76 /src/txtacc.c
parent8eb1be8941228d01438436b53dd46b422ba980a3 (diff)
downloadgrecs-aa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c.tar.gz
grecs-aa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c.tar.bz2
Implement parser for git-style config files.
* am/grecs.m4: New option: parser-git * doc/GRECS_SETUP.3: Document new options. * src/git-parser.c: New file. * src/Make.am [GRECS_COND_GIT_PARSER]: Define GRECS_PARSER_GIT. (GRECS_SRC): Add GRECS_PARSER_GIT. * src/grecs.h (grecs_git_parser): New proto. * src/txtacc.c (grecs_txtacc_free): Ignore NULL argument.
Diffstat (limited to 'src/txtacc.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/txtacc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/txtacc.c b/src/txtacc.c
index ff13e42..5ff9ec6 100644
--- a/src/txtacc.c
+++ b/src/txtacc.c
@@ -105,9 +105,11 @@ grecs_txtacc_create()
void
grecs_txtacc_free(struct grecs_txtacc *acc)
{
- grecs_list_free (acc->cur);
- grecs_list_free (acc->mem);
- free (acc);
+ if (acc) {
+ grecs_list_free (acc->cur);
+ grecs_list_free (acc->mem);
+ free (acc);
+ }
}
void

Return to:

Send suggestions and report system problems to the System administrator.