summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-03-12 17:53:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:20 -0500
commitdb249de135c5e931492687a821797b8a44b7ca9c (patch)
treec335b85532097339157b20f201135a7e12175d0c /source3/registry
parent0837f6b584aeafe25c2c746b1cd085bf70ca5533 (diff)
downloadsamba-db249de135c5e931492687a821797b8a44b7ca9c.tar.gz
samba-db249de135c5e931492687a821797b8a44b7ca9c.tar.bz2
samba-db249de135c5e931492687a821797b8a44b7ca9c.zip
r14247: Fix Coverity bug # 136
(This used to be commit 1b247ff2ed380f5b7d28917d74d6ef5609330a45)
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 );