ovs-lldp: Avoid free() of static data in aa_print_element_status_port().
authorBen Pfaff <blp@nicira.com>
Thu, 16 Apr 2015 15:52:29 +0000 (08:52 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Apr 2015 17:39:34 +0000 (10:39 -0700)
commitf0b3bf9806356bda0db36c49e3356a3a1e3f5e59
treed367e553ace110349fb4d5126765a54674c72136
parent5acf2e916a830e4b93eaf18cce5cced9a2a1ab5d
ovs-lldp: Avoid free() of static data in aa_print_element_status_port().

In some cases 'id' could point to the static string "<None>", which was
then passed to free() even though it must not be.  This commit fixes the
problem.

Found by LLVM scan-build.

Reported-by: Kevin Lo <kevlo@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Dennis Flynn <drflynn@avaya.com>
lib/ovs-lldp.c