Skip to content

Commit f186d07

Browse files
authored
fix: unreleased bug, deep copy new tls config fields (#82)
* fix: deep copy new tls config fields to avoid double free
1 parent 31be425 commit f186d07

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/backup_status.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ backup_status_destroy(backup_status_t* status)
486486
as_error ae;
487487
aerospike_close(status->as, &ae);
488488
aerospike_destroy(status->as);
489+
489490
cf_free(status->as);
490491

491492
as_exp_destroy(status->policy->base.filter_exp);

src/utils.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,9 @@ tls_config_clone(as_config_tls* clone, const as_config_tls* src)
20882088
clone->keyfile = safe_strdup(src->keyfile);
20892089
clone->keyfile_pw = safe_strdup(src->keyfile_pw);
20902090
clone->certfile = safe_strdup(src->certfile);
2091+
clone->castring = safe_strdup(src->castring);
2092+
clone->certstring = safe_strdup(src->certstring);
2093+
clone->keystring = safe_strdup(src->keystring);
20912094
}
20922095

20932096
void

0 commit comments

Comments
 (0)