X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a19d285ae3b4453f4643e1e347e9747c62f0aaa3..c8b823f9d8849a3bcb0ab9ffc85ff02c3d2eb367:/popt/poptparse.c 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 */