@@ -122,7 +122,6 @@ int azure_blob_store_buffer_put(struct flb_azure_blob *ctx, struct azure_blob_fi
122122 flb_sds_t name ;
123123 struct flb_fstore_file * fsf ;
124124 size_t space_remaining ;
125- // flb_sds_t path_sds;
126125
127126 if (ctx -> store_dir_limit_size > 0 && ctx -> current_buffer_size + bytes >= ctx -> store_dir_limit_size ) {
128127 flb_plg_error (ctx -> ins , "Buffer is full: current_buffer_size=%zu, new_data=%zu, store_dir_limit_size=%zu bytes" ,
@@ -154,6 +153,7 @@ int azure_blob_store_buffer_put(struct flb_azure_blob *ctx, struct azure_blob_fi
154153 if (ret == -1 ) {
155154 flb_plg_warn (ctx -> ins , "Deleting buffer file because metadata could not be written" );
156155 flb_fstore_file_delete (ctx -> fs , fsf );
156+ flb_sds_destroy (name );
157157 return -1 ;
158158 }
159159
@@ -163,6 +163,7 @@ int azure_blob_store_buffer_put(struct flb_azure_blob *ctx, struct azure_blob_fi
163163 flb_errno ();
164164 flb_plg_warn (ctx -> ins , "Deleting buffer file because azure_blob context creation failed" );
165165 flb_fstore_file_delete (ctx -> fs , fsf );
166+ flb_sds_destroy (name );
166167 return -1 ;
167168 }
168169 azure_blob_file -> fsf = fsf ;
@@ -334,7 +335,6 @@ int azure_blob_store_exit(struct flb_azure_blob *ctx)
334335 fsf = mk_list_entry (f_head , struct flb_fstore_file , _head );
335336 if (fsf -> data != NULL ) {
336337 azure_blob_file = fsf -> data ;
337- //flb_sds_destroy(azure_blob_file->file_path);
338338 flb_free (azure_blob_file );
339339 }
340340 }
@@ -400,25 +400,6 @@ int azure_blob_store_file_inactive(struct flb_azure_blob *ctx, struct azure_blob
400400 return ret ;
401401}
402402
403- void azure_blob_file_cleanup (struct azure_blob_file * file )
404- {
405- if (file == NULL ) {
406- return ;
407- }
408-
409- // Free the file path if it was dynamically allocated
410- /*if (file->file_path != NULL) {
411- flb_sds_destroy(file->file_path);
412- file->file_path = NULL;
413- }*/
414-
415- // If there are other dynamically allocated members, free them here
416- // For now, we only free file_path as per the given struct
417-
418- // Free the azure_blob_file itself
419- //flb_free(file);
420- }
421-
422403int azure_blob_store_file_cleanup (struct flb_azure_blob * ctx , struct azure_blob_file * azure_blob_file )
423404{
424405 struct flb_fstore_file * fsf ;
0 commit comments