From: Vincent Bernat Date: Tue, 8 Apr 2014 07:14:48 +0000 (+0200) Subject: coverity: fix memory leak in lldpd when the same option is repeated X-Git-Tag: 0.7.8~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79dae0f0d8fbd1ec6b2bb9c3dbf9a8115f612d12;p=thirdparty%2Flldpd.git coverity: fix memory leak in lldpd when the same option is repeated --- diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index e450fe6f..83309934 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -1376,9 +1376,11 @@ lldpd_main(int argc, char *argv[], char *envp[]) #endif break; case 'S': + free(descr_override); descr_override = strdup(optarg); break; case 'P': + free(platform_override); platform_override = strdup(optarg); break; case 'H':