Merge pull request #16 from ityuhui/yhmemleakfix
[Examples] Fix memory leak in example/list_pod
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user