]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
src/rrd_daemon.c: fix Coverity CID#32421 Resource leak
authorMarek Schimara <Marek.Schimara@bull.net>
Wed, 15 Jun 2016 08:56:37 +0000 (10:56 +0200)
committerMarek Schimara <Marek.Schimara@bull.net>
Thu, 23 Jun 2016 14:32:32 +0000 (16:32 +0200)
        CWE-404 / https://cwe.mitre.org/data/definitions/404.html

src/rrd_daemon.c

index ffdcfe51dd70909454f84f398102c9fc92a8526c..b1a7c599e7eacbe702292100c95fd0caa65a49ff 100644 (file)
@@ -3714,6 +3714,7 @@ static void *listen_thread_main (void UNUSED(*args)) /* {{{ */
         if (client_sock->addr == NULL)
         {
           RRDD_LOG (LOG_ERR, "listen_thread_main: strdup failed.");
+          free(client_sock);
           continue;
         }
       } // else, the socket is coming from systemd