From: Volker Lendecke Date: Tue, 21 Aug 2018 19:19:49 +0000 (+0200) Subject: libads: Fix an error path talloc leak X-Git-Tag: tdb-1.3.17~2096 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75ced0d15514b2d4707eb1813c461f135d9d20bf;p=thirdparty%2Fsamba.git libads: Fix an error path talloc leak Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libads/util.c b/source3/libads/util.c index 68c7aede21e..f387ca60bf7 100644 --- a/source3/libads/util.c +++ b/source3/libads/util.c @@ -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;