Skip to content

Commit 97f640e

Browse files
committed
CDRIVER-3754 add free of empty string
Coverity CID: 1158900
1 parent 0d6a915 commit 97f640e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libmongoc/src/mongoc/mongoc-cluster-aws.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ _obtain_creds_from_ecs (_mongoc_aws_credentials_t *creds, bson_error_t *error)
315315

316316
relative_ecs_uri = _mongoc_getenv ("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI");
317317
if (!relative_ecs_uri || strlen (relative_ecs_uri) == 0) {
318+
bson_free (relative_ecs_uri);
318319
return true;
319320
}
320321

0 commit comments

Comments
 (0)