Code

email plugin: fix check for result of malloc
authorRuben Kerkhof <ruben@tilaa.com>
Sat, 12 Dec 2015 11:24:41 +0000 (12:24 +0100)
committerRuben Kerkhof <ruben@tilaa.com>
Sat, 12 Dec 2015 11:24:41 +0000 (12:24 +0100)
CID #38010

src/email.c

index 0b140bfed55a0560aeb6e4f06f42ec39987c190e..4f5753c3f49fbecce57390a2096b30ca8f554f4f 100644 (file)
@@ -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;