mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Don't segfault when trying to delete a key when none exist.
(This used to be commit 1bf36d3fc6
)
This commit is contained in:
parent
9a0b6a2273
commit
8bd12bc330
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user