From: Vincent Bernat Date: Tue, 14 May 2013 20:36:36 +0000 (+0200) Subject: lldpcli: don't free input line X-Git-Tag: 0.7.4~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=655145c07b899e385cf3b8144758ea0c41d7518b;p=thirdparty%2Flldpd.git lldpcli: don't free input line Line returned by `fgetln()` should not be freed, including when we use the implementation we provide in `fgetln.c`. This fix an heap corruption. --- diff --git a/NEWS b/NEWS index 7a0a9701..fabe63d9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +lldpd (0.7.4) + * Fixes: + + Segfault in lldpcli. + lldpd (0.7.3) * Features: + DragonFly BSD support. diff --git a/src/client/lldpcli.c b/src/client/lldpcli.c index 189c0de5..3547039d 100644 --- a/src/client/lldpcli.c +++ b/src/client/lldpcli.c @@ -476,7 +476,6 @@ main(int argc, char *argv[]) line[len - 1] = '\0'; parse_and_exec(conn, fmt, line); } - free(line); } fclose(file); } else {