summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_db.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c
index e26b9a723b..5484c238b6 100644
--- a/source3/registry/reg_db.c
+++ b/source3/registry/reg_db.c
@@ -525,11 +525,13 @@ static int regdb_pack_values(REGVAL_CTR *values, char *buf, int buflen)
int len = 0;
int i;
REGISTRY_VALUE *val;
- int num_values = regval_ctr_numvals( values );
+ int num_values;
if ( !values )
return 0;
+ num_values = regval_ctr_numvals( values );
+
/* pack the number of values first */
len += tdb_pack( buf+len, buflen-len, "d", num_values );