Skip to content

Commit

Permalink
bug fix when include authorized ops is 0 desc Topics/Cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jainruchir committed Mar 31, 2023
1 parent a542f4d commit d0e2156
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rdkafka_admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -7079,7 +7079,8 @@ rd_kafka_DescribeTopicsResponse_parse(rd_kafka_op_t *rko_req,
md->topics[i].partition_cnt,
authorized_operations,
md->topics[i].err);
rd_list_destroy(authorized_operations);
if(authorized_operations)
rd_list_destroy(authorized_operations);
}
else
topicdesc = rd_kafka_TopicDescription_new_error(md->topics[i].topic,
Expand Down Expand Up @@ -7437,6 +7438,8 @@ rd_kafka_DescribeClusterResponse_parse(rd_kafka_op_t *rko_req,

clusterdesc = rd_kafka_ClusterDescription_new(cluster_id,
controller_id, authorized_operations, md);
if(authorized_operations)
rd_list_destroy(authorized_operations);
rd_free(cluster_id);

rd_list_add(&rko_result->rko_u.admin_result.results, clusterdesc);
Expand Down

0 comments on commit d0e2156

Please sign in to comment.