diff --git a/examples/exec_provider/list_pod_by_exec_provider.c b/examples/exec_provider/list_pod_by_exec_provider.c index 5a4e7d2..9f0c3d4 100644 --- a/examples/exec_provider/list_pod_by_exec_provider.c +++ b/examples/exec_provider/list_pod_by_exec_provider.c @@ -28,6 +28,8 @@ void list_pod(apiClient_t * apiClient) pod = listEntry->data; printf("\tThe pod name: %s\n", pod->metadata->name); } + v1_pod_list_free(pod_list); + pod_list = NULL; } else { printf("Cannot get any pod.\n"); } diff --git a/examples/list_pod/main.c b/examples/list_pod/main.c index 4ed94a9..1fdc926 100644 --- a/examples/list_pod/main.c +++ b/examples/list_pod/main.c @@ -28,6 +28,8 @@ void list_pod(apiClient_t * apiClient) pod = listEntry->data; printf("\tThe pod name: %s\n", pod->metadata->name); } + v1_pod_list_free(pod_list); + pod_list = NULL; } else { printf("Cannot get any pod.\n"); } diff --git a/examples/list_pod_incluster/main.c b/examples/list_pod_incluster/main.c index db31aaf..c51dfd5 100644 --- a/examples/list_pod_incluster/main.c +++ b/examples/list_pod_incluster/main.c @@ -29,6 +29,8 @@ void list_pod(apiClient_t * apiClient) pod = listEntry->data; printf("\tThe pod name: %s\n", pod->metadata->name); } + v1_pod_list_free(pod_list); + pod_list = NULL; } else { printf("Cannot get any pod.\n"); }