From af2f301138fed32705d865ce1c364ceb8ab3ddc7 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Wed, 27 Apr 2016 16:18:30 +0200 Subject: [PATCH] amqp plugin: prevent use after free Found by scan-build: amqp.c:1097:13: warning: Use of memory after it is freed camqp_config_free (conf); ^~~~~~~~~~~~~~~~~~~~~~~~ --- src/amqp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/amqp.c b/src/amqp.c index 2be55e07..fc69e936 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -737,7 +737,6 @@ static int camqp_subscribe_init (camqp_config_t *conf) /* {{{ */ { ERROR ("amqp plugin: realloc failed."); sfree (subscriber_threads); - camqp_config_free (conf); return (ENOMEM); } subscriber_threads = tmp; @@ -751,7 +750,6 @@ static int camqp_subscribe_init (camqp_config_t *conf) /* {{{ */ char errbuf[1024]; ERROR ("amqp plugin: pthread_create failed: %s", sstrerror (status, errbuf, sizeof (errbuf))); - camqp_config_free (conf); return (status); } -- 2.11.0