Skip to content

Commit

Permalink
fixup! wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kjdev committed Mar 27, 2024
1 parent b4b7059 commit 2d53c38
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ngx_keyval.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ ngx_keyval_conf_set_variable(ngx_conf_t *cf, ngx_command_t *cmd, void *conf,
ngx_str_t *value;
int final_pos = 0;
int num_vars = 0;
size_t size_buffer_variable_name, size_buffer_intermediate_string;
u_char *string, *variable_name;
size_t size_buffer_variable_name = 0, size_buffer_intermediate_string = 0;
u_char *string = NULL, *variable_name = NULL;
ngx_array_t *indexes = NULL;

if (!config || !tag) {
return "missing required parameter";
Expand Down Expand Up @@ -462,9 +463,9 @@ ngx_keyval_conf_set_variable(ngx_conf_t *cf, ngx_command_t *cmd, void *conf,
return "failed to allocate";
}
}
(*var)->indexes = ngx_array_push(config->indexes);
if ((*var)->indexes == NULL) {
return "failed to allocate iteam";
indexes = ngx_array_push(config->indexes);
if (indexes == NULL) {
return "failed to allocate item";
}
(*var)->indexes = ngx_array_create(cf->pool, 4, sizeof(ngx_int_t));
if ((*var)->indexes == NULL) {
Expand Down

0 comments on commit 2d53c38

Please sign in to comment.