]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
sharesec: Fix warning frame not freed in order
authorVinit Agnihotri <vagnihot@redhat.com>
Thu, 12 Dec 2024 13:35:24 +0000 (19:05 +0530)
committerJule Anger <janger@samba.org>
Tue, 21 Jan 2025 07:38:17 +0000 (07:38 +0000)
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 <vagnihot@redhat.com>
Reviewed-by: John Mulligan <jmulligan@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 04531e1b1d25d114c470922547bee769b07e5e60)

source3/utils/sharesec.c

index 417572954c8f339d9ce763837a4f9589ac10417a..3c93893e17890a04abbc2548cb6ea1ea66a65401 100644 (file)
@@ -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;
                        }