From: Ruben Kerkhof Date: Sat, 12 Dec 2015 11:24:41 +0000 (+0100) Subject: email plugin: fix check for result of malloc X-Git-Tag: collectd-5.6.0~492^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=add30acd6dd5b47853ff5c0205d23ff52792f6d8;p=collectd.git email plugin: fix check for result of malloc CID #38010 --- diff --git a/src/email.c b/src/email.c index 0b140bfe..4f5753c3 100644 --- a/src/email.c +++ b/src/email.c @@ -532,7 +532,7 @@ static void *open_connection (void __attribute__((unused)) *arg) } connection = malloc (sizeof (*connection)); - if (connection != NULL) + if (connection == NULL) { close (remote); continue;