diff options
Diffstat (limited to 'popt/poptparse.c')
-rw-r--r-- | popt/poptparse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/popt/poptparse.c b/popt/poptparse.c index bb3b69d6..e003a04a 100644 --- a/popt/poptparse.c +++ b/popt/poptparse.c @@ -163,8 +163,10 @@ int poptConfigFileToString(FILE *fp, char ** argstrp, /*@unused@*/ UNUSED(int fl p++; linelen = strlen(p); - if (linelen >= maxlinelen-1) + if (linelen >= maxlinelen-1) { + free(argstr); return POPT_ERROR_OVERFLOW; /* XXX line too long */ + } if (*p == '\0' || *p == '\n') continue; /* line is empty */ if (*p == '#') continue; /* comment line */ |