diff options
author | Jim McDonough <jmcd@samba.org> | 2002-12-03 19:25:01 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2002-12-03 19:25:01 +0000 |
commit | 1047e834170df74e1e0f8de7072244704b110243 (patch) | |
tree | 2096622fb4fbac6b318d6bec53ca96cca911f45b /source3/registry | |
parent | 6a019636b980857cf896f250841de757644ba9dd (diff) | |
download | samba-1047e834170df74e1e0f8de7072244704b110243.tar.gz samba-1047e834170df74e1e0f8de7072244704b110243.tar.bz2 samba-1047e834170df74e1e0f8de7072244704b110243.zip |
Don't segfault when trying to delete a key when none exist.
(This used to be commit 887ec4e5100dcbe8f1109232e27abc4ed6ad42f2)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_objects.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index be15e49a2f..e637321153 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -313,6 +313,8 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, char *name ) int i; /* search for the value */ + if (!(ctr->num_values)) + return 0; for ( i=0; i<ctr->num_values; i++ ) { if ( strcmp( ctr->values[i]->valuename, name ) == 0) |