winbind3: Fix an invalid free
authorVolker Lendecke <vl@samba.org>
Wed, 14 Aug 2013 09:27:59 +0000 (09:27 +0000)
committerStefan Metzmacher <metze@samba.org>
Wed, 14 Aug 2013 12:04:16 +0000 (14:04 +0200)
This fixes a warning I've never seen before :-)

../source3/winbindd/winbindd_cm.c:781:59: warning: attempt to free a non-heap object â€˜machine_krb5_principal’ [-Wfree-nonheap-object]

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug 14 14:04:16 CEST 2013 on sn-devel-104

source3/winbindd/winbindd_cm.c

index 1832b2b89353a3f3f68e99894213725964a9725a..d89ca9534315a4aa9faa849647642134befe359e 100644 (file)
@@ -778,7 +778,7 @@ static NTSTATUS get_trust_creds(const struct winbindd_domain *domain,
                }
 
                if (!strupper_m(*machine_krb5_principal)) {
-                       SAFE_FREE(machine_krb5_principal);
+                       SAFE_FREE(*machine_krb5_principal);
                        return NT_STATUS_INVALID_PARAMETER;
                }
        }