Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNeumann committed Feb 25, 2025
1 parent 35a6178 commit 7de78bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agent/lib_aws_sdk_php.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ void nr_aws_lambda_invoke(NR_EXECUTE_PROTO, nr_segment_cloud_attrs_t* cloud_attr
char* qualifier = NULL;
zval* qualifier_zval = NULL;
char* accountID = NULL;
bool using_account_id_ini = false;

/* verify arguments */
if (!nr_php_is_zval_valid_array(call_args)) {
Expand Down Expand Up @@ -448,6 +449,7 @@ void nr_aws_lambda_invoke(NR_EXECUTE_PROTO, nr_segment_cloud_attrs_t* cloud_attr
}
if (nr_strempty(accountID)) {
accountID = NRINI(aws_account_id);
using_account_id_ini = true;
}
if (nr_strempty(region)) {
region_zval
Expand Down Expand Up @@ -479,7 +481,9 @@ void nr_aws_lambda_invoke(NR_EXECUTE_PROTO, nr_segment_cloud_attrs_t* cloud_attr

nr_regex_substrings_destroy(&matches);
nr_free(function_name);
nr_free(accountID);
if (!using_account_id_ini) {
nr_free(accountID);
}
nr_free(region);
nr_free(qualifier);
nr_php_zval_free(&region_zval);
Expand Down

0 comments on commit 7de78bf

Please sign in to comment.