From: Vinit Agnihotri Date: Thu, 12 Dec 2024 13:35:24 +0000 (+0530) Subject: sharesec: Fix warning frame not freed in order X-Git-Tag: samba-4.20.7~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=839b32b1d14c8a45d58a75ef45d145d20744604a;p=thirdparty%2Fsamba.git sharesec: Fix warning frame not freed in order This change should fix following warning: Freed frame ../../source3/utils/sharesec.c:515, expected ../../source3/utils/sharesec.c:637 Frame was not getting freed in case of servicename is NULL. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15780 Signed-off-by: Vinit Agnihotri Reviewed-by: John Mulligan Reviewed-by: Guenther Deschner (cherry picked from commit 04531e1b1d25d114c470922547bee769b07e5e60) --- diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c index 417572954c8..3c93893e178 100644 --- a/source3/utils/sharesec.c +++ b/source3/utils/sharesec.c @@ -563,6 +563,7 @@ int main(int argc, const char *argv[]) const char *service = lp_servicename(frame, lp_sub, i); if (service == NULL) { + TALLOC_FREE(frame); continue; }