Skip to content

Commit 9bb23ff

Browse files
committed
Fix for C SDK Issue-229
1 parent 1b4462d commit 9bb23ff

File tree

1 file changed

+2
-1
lines changed
  • ds3-autogen-c/src/main/resources/templates/other-templates

1 file changed

+2
-1
lines changed

ds3-autogen-c/src/main/resources/templates/other-templates/ds3_net_c.ftl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ ds3_error* net_process_request(const ds3_client* client,
572572
}
573573
ds3_string_multimap_free(response_headers);
574574
ds3_str_free(response_data.status_message);
575-
g_free(url);
576575

577576
if (response_data.status_code == 307) {
578577
ds3_log_message(client->log, DS3_INFO, "Request encountered a 307 redirect");
@@ -585,9 +584,11 @@ ds3_error* net_process_request(const ds3_client* client,
585584
error->message = ds3_str_init("Encountered too many redirects while attempting to fulfill the request");
586585
error->code = DS3_ERROR_TOO_MANY_REDIRECTS;
587586
} else {
587+
ds3_error_free(error);
588588
continue;
589589
}
590590
}
591+
g_free(url);
591592
return error;
592593
}
593594
g_byte_array_free(response_data.body, TRUE);

0 commit comments

Comments
 (0)