From: Vincent Bernat Date: Sat, 11 Jul 2015 21:10:04 +0000 (+0200) Subject: lib: fix memory leak when handling MED location data X-Git-Tag: 0.7.16~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa2890879e7467e5bf3c8ff0781b8f6f893dc810;p=thirdparty%2Flldpd.git lib: fix memory leak when handling MED location data When formatting fixed precision data, the result was copied into the atom but the original wasn't freed. --- diff --git a/src/lib/atoms/med.c b/src/lib/atoms/med.c index c274d4c9..305bd55c 100644 --- a/src/lib/atoms/med.c +++ b/src/lib/atoms/med.c @@ -497,6 +497,7 @@ read_fixed_precision(lldpctl_atom_t *atom, return NULL; } strlcpy(stored, result, len); + free(result); return stored; }