2828#include "ds3_connection.h"
2929#include "ds3_request.h"
3030#include "ds3_string_multimap_impl.h"
31+ #include "ds3_uint64_string_map.h"
3132#include "ds3_utils.h"
3233
3334#ifdef _WIN32
@@ -360,7 +361,7 @@ ds3_bulk_object_list_response* ds3_convert_object_list(const ds3_contents_respon
360361 for (object_index = 0 ; object_index < num_objects ; object_index ++ ) {
361362 ds3_bulk_object_response * response = g_new0 (ds3_bulk_object_response , 1 );
362363 response -> name = ds3_str_dup (objects [object_index ]-> key );
363- response -> version = ds3_str_dup (objects [object_index ]-> version_id );
364+ response -> version_id = ds3_str_dup (objects [object_index ]-> version_id );
364365
365366 g_ptr_array_add (ds3_bulk_object_response_array , response );
366367 }
@@ -448,6 +449,36 @@ void ds3_delete_objects_response_free(ds3_delete_objects_response* response) {
448449 g_free (response );
449450}
450451
452+ void ds3_ids_list_free (ds3_ids_list * ids ) {
453+ if (ids == NULL ) {
454+ return ;
455+ }
456+
457+ int index ;
458+ for (index = 0 ; index < ids -> num_strings ; index ++ ) {
459+ ds3_str_free (ids -> strings_list [index ]);
460+ }
461+ g_free (ids -> strings_list );
462+ g_free (ids );
463+ }
464+
465+ void ds3_head_object_response_free (ds3_head_object_response * response ) {
466+ if (response == NULL ) {
467+ return ;
468+ }
469+ if (response -> blob_checksum_type != NULL ) {
470+ g_free (response -> blob_checksum_type );
471+ }
472+ if (response -> metadata != NULL ) {
473+ ds3_metadata_free (response -> metadata );
474+ }
475+ if (response -> blob_checksums != NULL ) {
476+ ds3_uint64_string_map_free (response -> blob_checksums );
477+ }
478+
479+ g_free (response );
480+ }
481+
451482void ds3_paging_free (ds3_paging * paging ) {
452483 g_free (paging );
453484}
@@ -741,7 +772,6 @@ void ds3_s3_object_response_free(ds3_s3_object_response* response) {
741772 ds3_str_free (response -> creation_date );
742773 ds3_str_free (response -> id );
743774 ds3_str_free (response -> name );
744- ds3_str_free (response -> version );
745775
746776 g_free (response );
747777}
@@ -1088,7 +1118,6 @@ void ds3_suspect_blob_pool_response_free(ds3_suspect_blob_pool_response* respons
10881118 ds3_str_free (response -> date_written );
10891119 ds3_str_free (response -> id );
10901120 ds3_str_free (response -> last_accessed );
1091- ds3_str_free (response -> obsoletion_id );
10921121 ds3_str_free (response -> pool_id );
10931122
10941123 g_free (response );
@@ -1100,7 +1129,6 @@ void ds3_suspect_blob_tape_response_free(ds3_suspect_blob_tape_response* respons
11001129
11011130 ds3_str_free (response -> blob_id );
11021131 ds3_str_free (response -> id );
1103- ds3_str_free (response -> obsoletion_id );
11041132 ds3_str_free (response -> tape_id );
11051133
11061134 g_free (response );
@@ -2756,7 +2784,7 @@ void ds3_bulk_object_response_free(ds3_bulk_object_response* response) {
27562784 ds3_str_free (response -> id );
27572785 ds3_str_free (response -> name );
27582786 ds3_physical_placement_response_free (response -> physical_placement );
2759- ds3_str_free (response -> version );
2787+ ds3_str_free (response -> version_id );
27602788
27612789 g_free (response );
27622790}
@@ -3000,7 +3028,6 @@ void ds3_detailed_s3_object_response_free(ds3_detailed_s3_object_response* respo
30003028 ds3_str_free (response -> id );
30013029 ds3_str_free (response -> name );
30023030 ds3_str_free (response -> owner );
3003- ds3_str_free (response -> version );
30043031
30053032 g_free (response );
30063033}
0 commit comments