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)
committerMarc Fournier <marc.fournier@camptocamp.com>
Tue, 12 Jan 2016 06:37:32 +0000 (07:37 +0100)
CID #38010

src/email.c

index 0e34b89f4661a870fa2032868f0e902f5e87911a..ca4dbc2c34706405b7626be0e882559fef3d947c 100644 (file)
@@ -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;