From ca70f53930df64b6a2fcb563b4ffa84d99a01741 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 22 Nov 2006 16:39:07 +0000 Subject: [PATCH] r19840: Fix an uninitialized variable (This used to be commit c4b5e8c7a0b936a3d95f221718a048d5374e836a) --- source3/utils/net_sam.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index b041bd7a658..d92bf1521cd 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -378,6 +378,13 @@ static int net_sam_policy_set(int argc, const char **argv) printf("Account policy \"%s\" description: %s\n", account_policy, account_policy_get_desc(field)); + + if (!pdb_get_account_policy(field, &old_value)) { + fprintf(stderr, "Valid account policy, but unable to " + "fetch value!\n"); + return -1; + } + printf("Account policy \"%s\" value was: %d\n", account_policy, old_value);