Fix Coverity ID 707 (RESOURCE_LEAK)
authorVolker Lendecke <vl@samba.org>
Fri, 13 Feb 2009 09:19:26 +0000 (10:19 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 13 Feb 2009 09:21:03 +0000 (10:21 +0100)
lib/util/util.c

index 7548d30b7ef80bba8f40f0f4a6cddbc481d41f21..40ac7f79e69578a43cf24fb3a275172c8663f12c 100644 (file)
@@ -206,6 +206,7 @@ _PUBLIC_ char *get_myname(void)
        /* get my host name */
        if (gethostname(hostname, MAXHOSTNAMELEN+1) == -1) {
                DEBUG(0,("gethostname failed\n"));
+               free(hostname);
                return NULL;
        }