File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
245245
246246 if (!cloud ) {
247247 flb_plg_error (ctx -> ins , "could not load Calyptia Cloud connector" );
248- flb_free (ctx );
249248 return NULL ;
250249 }
251250
@@ -254,7 +253,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
254253
255254 if (ret != 0 ) {
256255 flb_plg_error (ctx -> ins , "could not load Calyptia Cloud connector" );
257- flb_free (ctx );
258256 return NULL ;
259257 }
260258
@@ -268,7 +266,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
268266 label = flb_sds_create_size (strlen (key -> str ) + strlen (val -> str ) + 1 );
269267
270268 if (!label ) {
271- flb_free (ctx );
272269 return NULL ;
273270 }
274271
@@ -316,7 +313,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
316313 label = flb_sds_create_size (strlen ("fleet_id" ) + strlen (ctx -> fleet_id ) + 1 );
317314
318315 if (!label ) {
319- flb_free (ctx );
320316 return NULL ;
321317 }
322318
@@ -455,6 +451,7 @@ static int cb_calyptia_init(struct flb_custom_instance *ins,
455451 ctx -> o = setup_cloud_output (config , ctx );
456452
457453 if (ctx -> o == NULL ) {
454+ flb_free (ctx );
458455 return -1 ;
459456 }
460457 }
You can’t perform that action at this time.
0 commit comments