]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libads: Fix an error path talloc leak
authorVolker Lendecke <vl@samba.org>
Tue, 21 Aug 2018 19:19:49 +0000 (21:19 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 21 Aug 2018 22:58:41 +0000 (00:58 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libads/util.c

index 68c7aede21e74aa1efd244f95dd05e928abfa2fa..f387ca60bf742fce776b82ea2a021c15bbc95783 100644 (file)
@@ -166,7 +166,8 @@ struct spn_struct *parse_spn(TALLOC_CTX *ctx, const char *srvprinc)
        result->serviceclass = talloc_strdup(result, srvprinc);
        if (result->serviceclass == NULL) {
                DBG_ERR("Out of memory\n");
-               return NULL;
+               TALLOC_FREE(result);
+               goto out;
        }
        result->port = -1;