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.5.1~7^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=951af13fcec781791beaff29ea76639a8ff166d9;p=collectd.git email plugin: fix check for result of malloc CID #38010 --- diff --git a/src/email.c b/src/email.c index 0e34b89f..ca4dbc2c 100644 --- a/src/email.c +++ b/src/email.c @@ -534,7 +534,7 @@ static void *open_connection (void __attribute__((unused)) *arg) } connection = malloc (sizeof (*connection)); - if (connection != NULL) + if (connection == NULL) { close (remote); continue;