static int key_driver_fetch_values( const char *key, REGVAL_CTR *values ) { char *keystr; pstring subkey; DEBUG(8,("key_driver_fetch_values: Enter key => [%s]\n", key ? key : "NULL")); /* no values in the Environments key */ if ( !(keystr = reg_remaining_path( key + strlen(KEY_ENVIRONMENTS) )) ) return 0; pstrcpy( subkey, keystr); /* pass off to handle subkeys */ return driver_arch_fetch_values( subkey, values ); }
static int key_driver_fetch_values( const char *key, REGVAL_CTR *values ) { char *keystr = NULL; char *subkey = NULL; TALLOC_CTX *ctx = talloc_tos(); DEBUG(8,("key_driver_fetch_values: Enter key => [%s]\n", key ? key : "NULL")); /* no values in the Environments key */ if (!(keystr = reg_remaining_path(ctx, key + strlen(KEY_ENVIRONMENTS)))) return 0; subkey = talloc_strdup(ctx, keystr); if (!subkey) { return 0; } /* pass off to handle subkeys */ return driver_arch_fetch_values( subkey, values ); }