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: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1462%2Fhead;p=thirdparty%2Fcollectd.git email plugin: fix check for result of malloc CID #38010 --- diff --git a/src/email.c b/src/email.c index 0b140bfed..4f5753c3f 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;